Powershell command to find disabled AD accounts with active mailboxes and specific AD description
I am looking for a command to run in Powershell that will find all disabled AD accounts with active mailboxes and specific text thread in the AD description field. Below is what I have so far which will find the disabled AD user accounts with active mailboxes: $mailboxlist = Get-Mailbox -ResultSize Unlimited | ? {$_.UserAccountControl -match AccountDisabled -and $_.isLinked -match false -and $_.isResource -match false} If possible, what parameters would I need to add to the line above to also find those disabled accounts with active mailboxes that also contain as specific word (example: "test") in the AD description? Please contact me if you have any questions. Thank you.
August 16th, 2012 2:33pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics