Saturday, October 4, 2008

Using DSQUERY To List User Without Exchange Accounts

This command searches the active directory for users accounts which don’t have an exchange account as indicated by a blank/null homeMDB property.
dsquery * “dc=example,dc=com” -filter “(&(objectCategory=person)(objectClass=user)(!homeMDB=*))” -limit 0 | dsget user -samid -dn -disabled