none
Finding test accounts in active directory RRS feed

  • Question

  • i am writing a scipt to find  ad accounts that start with Test and accounts that start with Tst.
    I tried this first (gave me no findings or errors) >> 

    get-aduser -filter * -properties *  | ?($_.name -like "Test*" -and $_.name -like "Tst*")

    I tried this second (gave me no findings or error) >>

    get-aduser -filter * -properties *  | ?{($_.name -like "Test*" -and $_.name -like "Tst*")}

    What is wrong with my syntax? Why does command terminate without results or error.  I Know there are over two hundred accounts

    Wednesday, November 8, 2017 5:27 PM

Answers