Link to home
Start Free TrialLog in
Avatar of ncomper
ncomper

asked on

Exchange Custom address list based on company - will it exclude accounts hidden from GAL

Hi All

I have a question thats been puzzling me, we use an LDAP filter to create an address book based on the users company attribute, this works fine, however i needed to create a report for all users in that address book which i though would be easy, i just copied the ldap query on the custom address list and created a saved query in ADUC and then ran it,

However when i preview the query within Exchange System manager it shows 2700 users, when i run the same query from within ADUC and export it to a CSV it shows 3500 users. Exchange must be exluding accounts that the Save query is not, can anyone tell me what i need to do to the below to make sure it displays the same users as the Query that populates the address list.

(&(&(&(& (mailnickname=*) (| (&(objectCategory=person)(objectClass=user)(!(homeMDB=*))(!(msExchHomeServerName=*)))(&(objectCategory=person)(objectClass=user)(|(homeMDB=*)(msExchHomeServerName=*)))(&(objectCategory=person)(objectClass=contact))(objectCategory=group)(objectCategory=publicFolder)(objectCategory=msExchDynamicDistributionList) )))(objectCategory=user)(company=ABS Branch)))


Thanks

Nick
ASKER CERTIFIED SOLUTION
Avatar of Jamie McKillop
Jamie McKillop
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Specifically...

(&(&(&(& (mailnickname=*) (| (&(objectCategory=person)(objectClass=user)(!(homeMDB=*))(!(msExchHomeServerName=*)(!(msExchHideFromAddressLists=TRUE)))(&(objectCategory=person)(objectClass=user)(|(homeMDB=*)(msExchHomeServerName=*)))(&(objectCategory=person)(objectClass=contact))(objectCategory=group)(objectCategory=publicFolder)(objectCategory=msExchDynamicDistributionList) )))(objectCategory=user)(company=ABS Branch)))
Avatar of ncomper
ncomper

ASKER

Hi

I get an error stating invlaid query when i try and run that, ill post the screenshot on Tuesday

Thanks

Nick
Avatar of ncomper

ASKER

Hi jjmck

I have tried running that query but i get the attached error, any ideas?

Thanks

Nick
LDAP-Query.JPG
Avatar of ncomper

ASKER

Hi

Just FYI for perople searching this in future, the below query gave me an exact match that i was getting when previewing the query on the properties of the address list.

(&(&(&(&(& (mailnickname=*) (| (&(objectCategory=person)(objectClass=user)(|(homeMDB=*)(msExchHomeServerName=*)))(&(objectCategory=person)(objectClass=contact))(objectCategory=msExchDynamicDistributionList) )))(objectCategory=user)(company=ABS Branch)(!msExchHideFromAddressLists=TRUE))))
Avatar of ncomper

ASKER

Thanks for the help.