Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

Find enabled users in a given mailbox database

$
0
0

Get-Mailbox doesn't take parameter that filters by enabled/diabled

Get-ADUser doesn't take a parameter that filters by mailbox database

I tried

Get-Mailbox -Database db02 | Get-ADUser -LDAPFilter "(&(objectCategory=person)(objectClass=user)(!userAccountControl:1.2.840.113556.1.4.803:=2))"

but that seems to return all enabled users and the second part doesn't seem to limit the input to the output of the first part.

Any ideas how this can be accomplished?


Viewing all articles
Browse latest Browse all 6937

Trending Articles