Using get-adUser with Multiple Filter items

I am trying to filter on 2 different conditions:

  • disabled accounts
  • description like 'disabled'

This works:

get-adUser -Filter ('description -like "DISABLED*"') -SearchBase ....

and this works:

get-adUser -Filter ({Enabled -ne $true}) -SearchBase

BUT ... this does not:

get-adUser -Filter (('description -like "DISABLED*"') -or {Enabled -ne $true}) -SearchBase

Any ideas/suggestions are appreciated.

Thanks

Parents
No Data
Reply
  • Thanks Jeffery, That worked!! I will take this lesson under advisement -Filter (condition A) works -Filter (condition B) works does not mean that -Filter (condition A -or condition B) will work ... ;) Thanks for the prompt response
Children
No Data