Quantcast
Channel: Windows PowerShell Forum
Viewing all articles
Browse latest Browse all 2562

Issue with wildcard search in get-adcomputer

$
0
0

I am trying to perform a search for computers in my domain that end with lab## (ex/ lab02, lab03, etc) and I am having issues getting the filter to work. I can run the filter as

get-adcomputer -searchbase $oubase -properties Name -fitler {Name -Like "*lab*"}

But I need to have the last 2 places be numeric as well {*lab[0-9][0-9]}. This does not work at all and I have tried several variants with no success. How would I go about constructing this statement to work. Any advice or information would be greatly appreciated.


Viewing all articles
Browse latest Browse all 2562

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>