We help IT Professionals succeed at work.

Query on Outlook GAL

Medium Priority
1,087 Views
Last Modified: 2012-08-21
Hello,

How can I make LDAP Query to the Outlook GAL outside of Outlook.?

And can I inquire if the user is active/enabled or inactive/disabled?

If need be, use LDAP client or PowerShell, etc...

Thanks in advance.
W
Comment
Watch Question

Commented:
What version of Exchange are we talking about here?

You can look at the properties of the Global Address List in ADSIEDIT and powershell and if my memory serves me correctly, the should be a PurportedSearch property which is basically the LDAP query in use:
http://technet.microsoft.com/en-us/library/dd535387(v=exchg.80).aspx

You can then take that query and use it in ADUC as a custom search query.
Manpreet SIngh KhatraSolutions Architect, Project Lead
CERTIFIED EXPERT
Top Expert 2013
Commented:
http://social.technet.microsoft.com/Forums/en/ITCG/thread/9737bc40-5cae-4cfc-b189-f3e0fc7e934c

@echo off
for /f %%i in (input.txt) do dsquery user -samid %%i >> temp.tmp
type temp.tmp|dsget user -samid -display -disabled > outfile.txt
del temp.tmp

VBScript for Finding Disabled / Enabled User objects
http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/Server/2003_Server/Q_22506463.html

This can be done in ADUC (Active Directory Users and Computers) Search
New->Query->Set->Spefied Search->Advanced and type in the following string:
(&(objectCategory=User)(userAccountControl:1.2.840.113556.1.4.803:=2))

- Rancy

Author

Commented:
Sorry I am a bit confused.

I am from a client machine on Windows XP, logged into the domain, and I use outlook to get access to emails and GAL.

So, i want to check which users in GAL are enabled and/or disabled.

There are a few thousands of them and I can't do it in outlook one by one manually.

Therefore, i need external tool to get access to it and script it to extract what i want.

Thanks and regards,
William
Commented:
Install Active Directory Users and Computers on XP, then create a query as per what we have said above.
Manpreet SIngh KhatraSolutions Architect, Project Lead
CERTIFIED EXPERT
Top Expert 2013
Commented:
Find Disabled\Enabled users in AD

This can be done in ADUC (Active Directory Users and Computers) Search
New->Query->Set->Spefied Search->Advanced and type in the following string:
(&(objectCategory=User)(userAccountControl:1.2.840.113556.1.4.803:=2))

Hide from GAL attribute
msExchHideFromAddressLists

- Rancy

Author

Commented:
Cool. i got it working... Solid.

OK, I have one more question to ask on top of this but to be fair, I will start a new thread.

Thanks. I will accept solutions for now.

Thanks Buds.

W

Author

Commented:
It works :) As simple as that.

Commented:
Enjoy. Thanks for the points.

Explore More ContentExplore courses, solutions, and other research materials related to this topic.