Wednesday, April 10, 2013

disabled users with exchange mailboxes


Find mailboxes have disabled AD accounts, they usually receive emails and should be disabled from exchange.

get-Mailbox -resultsize unlimited | where { $_.ExchangeUserAccountControl -match “AccountDisabled”} | select name,database,organizationalunit | sort-object name | export-csv c:\admin\disabledwithmail.csv

No comments:

Post a Comment