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