AD Query needed filtered on word in display name and to export delivery restrictions attribute

ncomper
ncomper used Ask the Experts™
on
Hi All

I need to query AD for only users with a specific word in the display name, i then need to export there Exchange Delivery Restrictions attribute

Anyone have a script for this?

Thanks
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Senior Active Directory Engineer
Top Expert 2012
Commented:
You can try with standard DSQUERY syntax

dsquery * -filter "(&(objectClass=User)(objectCategory=person)(displayName=*pattern*)) -attr sAMAccountName givenName sn displayName authOrig >>c:\users.txt

Open in new window


in case that it will not work, we try with Exchange Management Shell (EMS)

Regards,
Krzysztof

Author

Commented:
Hi

Thanks for the help, when i run this from a command prompt on our exchange server i get a message saying
dsquery failed: The Search Filter cannot be recognized

Any ideas?

Thanks

Author

Commented:
Also apologies i also stated the incorrect attribute, i am looking for the Storage Limits Issue warning at, Prohibit Send at and Prohibit Send and recieve at,
A lot of people have been configured to bypass the mailbox store defaults and i now now need to identify the users.

Thanks again

Author

Commented:
Thanks

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial