Simple Syntax Error, but I cannot figure it out!

This topic contains 1 reply, has 1 voice, and was last updated by  Ryane Helder 2 years, 4 months ago.

  • Author
  • #35724

    Ryane Helder

    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 
  • #35725

    Ryane Helder

    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 

You must be logged in to reply to this topic.