Simple Syntax Error, but I cannot figure it out!

Tagged: 

This topic contains 1 reply, has 1 voice, and was last updated by Profile photo of Ryane Helder Ryane Helder 7 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #35724
    Profile photo of Ryane Helder
    Ryane Helder
    Participant

    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
    Profile photo of Ryane Helder
    Ryane Helder
    Participant

    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 
    
Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.