Wednesday, 29 September 2010

Get all SMTP addresses from Exchange server

dsquery * -filter "(&(objectCategory=person)(objectClass=user)(mail=*))" -attr mail displayname -limit 0 > email_addresses.txt

No comments:

Post a Comment