Author Posts

February 25, 2016 at 9:53 pm

I hate these types of things...I've tried several different ways to write this, and I finally got to a point where I cannot get past a syntax error. Any help would be appreciated!!! I feel very stupid right now, but I have tried anything I can think of (along with a lot of googling) and I am just stuck. Thank you.

(Get-ADComputer -Filter {Name -like '*P30' -or '*P32'} -SearchBase "OU=Print,OU=PROD,OU=POS,DC=COMPANY,DC=NET").name | Sort-Object | Out-File C:\Temp\P30ServersMI.csv 

February 25, 2016 at 10:27 pm

fixed it! Sorry – my bad

(Get-ADComputer -Filter "Name -like '*P30' -or Name -like '*P32'" -SearchBase "OU=Print,OU=PROD,OU=POS,DC=COMPANY,DC=NET").name | Sort-Object | Out-File C:\Temp\P30ServersMI.csv