The Exchange 2007 Wiki

Email Address Policy and Address List Filter Upgrades

This is a page to store any custom LDAP filters and their equivalent Exchange 2007 OPATH Powershell filters for EAP or AL. While there are nearly infinite possible filters you might have in LDAP, there are probably a couple of primary themes that might help others with their LDAP->OPATH conversions. Please feel free to post your examples on this page. Here's the technet reference of Exchange 2007 RTM Filterable Properties.

 Users in a specific AG + all groups that start with a particular string:

LDAP:

(&(&(|(&(&(objectCategory=user)(msExchHomeServerName=/o=ORG/ou=SITE/cn=Configuration/cn=Servers/cn=*)))(&(|(objectCategory=group)(objectCategory=msExchDynamicDistributionList))(displayname=IT*)))))

OPATH:

(ServerLegacyDN -like "/o=ORG/ou=SITE/cn=Configuration/cn=Servers/cn=*" ) -or ( ( RecipientType -eq "MailEnabledUniversalDistributionGroup" –or RecipientType -eq "MailEnabledUniversalSecurityGroup" -or RecipientType -eq "MailEnabledNonUniversalGroup" -or RecipientType -eq "DynamicDL") -and ( DisplayName -like "IT*" ) )

For examples see the New-EmailAddressPolicy page.

Comments

From Sharon - 6/23/10 4:57 AM

hi,

Can anyone please hep me convert the below two adress lists to OPTAH:

1. (msExchResourceGUID={A1C12B06-B01B-11d2-85EB-00C04FA376EB})

2. (&(&(&(& (mailnickname=*) (| (&(objectCategory=person)(objectClass=user)(|(homeMDB=*)(msExchHomeServerName=*))) )))(objectCategory=user)(description=Video Conference Room*)))

Thanks much in advanced,

Sharon

From ddrewsus - 3/16/10 9:29 AM

I'm missing something.  Could you tell me the command to enter before the -RecipientFilter.

From nlcribby - 1/11/10 7:24 AM

Could someone please convert this Exchange 2003 Custom Address list so I can use the powershell command to convert it to Exchange 2007.  I'm pulling my hair out..

 thanks in advance

 (&(&(&(& (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)(mail=*@mydomain.com)))

From MissyKos - 12/11/09 11:49 AM

(&(&(&(&(& (mailnickname=*) (| (&(objectCategory=person)(objectClass=user)(!(msExchHomeServerName=*)))(&(objectCategory=person)(objectClass=user)(|(msExchHomeServerName=*)))(&(objectCategory=person)(objectClass=contact))(objectCategory=group)(objectCategory=publicFolder)(objectCategory=msExchDynamicDistributionList) )))(objectCategory=user)(department=Contrack))))

 You actually can avoid typing most of this when turning the LDAP filter into OPATH. The filter is basically looking for objects with the department attribute defined as "Contrack". This can be defined in OPATH as follows:

-RecipientFilter {((RecipientType -like "*") -and (department -eq "Contrack"))}

From NabilSaied - 6/3/09 1:19 AM

Can You please help me how to convert this LDAP to OPATH filters

 

 


(&(&(&(&(& (mailnickname=*) (| (&(objectCategory=p
erson)(objectClass=user)(!(msExchHomeServerName=*)
))(&(objectCategory=person)(objectClass=user)(|(ms
ExchHomeServerName=*)))(&(objectCategory=person)(o
bjectClass=contact))(objectCategory=group)(objectC
ategory=publicFolder)(objectCategory=msExchDynamic
DistributionList) )))(objectCategory=user)(departm
ent=Contrack))))

Site

Changes
Index
Search

 

User

 

Log In
Register

 
 

Last Modified 2/22/08 12:49 PM