Querying Active Directory via LDAP

6850 pts.
Tags:
Active Directory
LDAP
Microsoft Windows
I am trying to query active directory and I know that I can do a search like this: (&(objectClass=user) (&(mDBStorageQuota=10000))) where it searches for all objects that are 'user' objects and have an exchange lower limit set to '10000' which is 10MB. What I am trying to do is a search on a field that is not equal to but contains a string: (&(objectClass=user) (&(proxyAddresses=*@mydomain.com))) where it searches for all objects that are 'user' objects AND have an SMTP email address that contains '@mydomain.com' in the end of the address. Our company has 4 affilliates so each user could possibly have 5 or 6 email addresses that will all resolve to their email inbox. One of our divisions merged with the main affilliate and we are trying to search all accounts for email addresses that contain that division's email address. Anyone have any idea how to word the search string so that it is not an '=' but a 'contains' search string?

Answer Wiki

Thanks. We'll let you know when a new response is added.

Check out the <a href=”http://www.powergui.org/index.jspa”>PowerGui</a> utility for Powershell scripting. You will need the Exchange Server management pack installed on your client but you can use this to generate some very nice reports from AD/Exchange, etc.

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Buddyfarr
    I am writing this script in UMRA, User Management Resource Administrator, thus I need to write the code in that program, not in PowerGUI. I will check it out anyway just in case it will show me the code. Then I can possibly rewrite it into my program. thanks!
    6,850 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following