marty Posted August 22, 2012 Posted August 22, 2012 Is it possible to create a custom GAL that includes all user email addresses, groups and dynamic distribution lists excluding any users who have their custom attribute 1 set to 'student' and also exclude any users where custom attribute 10 is set to 'headteacher'? I've been trying using the set-globaladdresslist recipient filter parameter in power shell but to no avail. I've successfully done this in LDAP but I'm unable to transpose the query into Opath.
SYNACK Posted August 22, 2012 Posted August 22, 2012 Tried these: Need help converting your LDAP filters to OPATH? - Exchange Team Blog - Site Home - TechNet Blogs Upgrade Custom LDAP Filters to OPATH Filters: Exchange 2010 Help
marty Posted August 23, 2012 Author Posted August 23, 2012 Thanks for that Synack I managed to convert my Global Address Lists LDAP filters to Opath following your links. I have since realised that even through I have set up discrete GALs for staff, students and HT and everything is fine in OWA, Outlook 2010 chooses to ignore my users' msExchQueryBaseDN values (e.g. Staff use CN=Staff GAL,CN=All Global Address Lists,CN=Address Lists Container,CN=Exchange Organization,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=laurenjack,DC=internal) and doesn't display the correct GAL for staff (Staff GAL). However, when students open the Outlook2010 application, they do see the correct GAL (Student GAL). Anybody willing to check my OPATH recipient filters at all? FYI I am administering Exchange 2007? HeadTeacher GAL OPATH ( ( Alias -ne $null ) -and ( ( ( ObjectCategory -like 'person' ) -and ( ObjectClass -eq 'user' ) -and -not ( Database -ne $null ) -and -not ( ServerLegacyDN -ne $null ) ) -or ( ( ObjectCategory -like 'person' ) -and ( ObjectClass -eq'user' ) -and ( recipientType -eq 'UserMailbox' ) ) -or ( ( ObjectCategory -like 'person' ) -and ( ObjectClass -eq 'contact' ) ) -or ( ObjectCategory -like 'group' ) -or ( ObjectCategory -like 'publicFolder' ) -or ( ObjectCategory -like'msExchDynamicDistributionList' ) ) -and -not ( customAttribute1 -eq 'student' ) ) ( ( Alias -ne $null ) -and ( ( ( ObjectCategory -like 'person' ) -and ( ObjectClass -eq 'user' ) -and -not ( Database -ne $null ) -and -not ( ServerLegacyDN -ne $null ) ) -or ( ( ObjectCategory -like 'person' ) -and ( ObjectClass -eq 'user' ) -and ( recipientType -eq 'UserMailbox' ) ) -or ( ( ObjectCategory -like 'person' ) -and ( ObjectClass -eq 'contact' ) ) -or ( ObjectCategory -like 'group' ) -or ( ObjectCategory -like 'publicFolder' ) -or ( ObjectCategory -like 'msExchDynamicDistributionList' ) ) -and -not ( customAttribute1 -eq 'student' ) ) Student GAL OPATH ( ( customAttribute1 -eq 'student' ) -and ( ObjectClass -eq 'user' ) -and ( ObjectCategory -like 'person' ) -and ( Alias -ne $null ) -and ( ServerLegacyDN -ne $null ) ) Staff GAL OPATH ( ( Alias -ne $null ) -and ( ( ( ObjectCategory -like 'person' ) -and ( ObjectClass -eq 'user' ) -and -not ( Database -ne $null ) -and -not ( ServerLegacyDN -ne $null ) ) -or ( ( ObjectCategory -like 'person' ) -and ( ObjectClass -eq'user' ) -and ( recipientType -eq 'UserMailbox' ) ) -or ( ( ObjectCategory -like 'person' ) -and ( ObjectClass -eq 'contact' ) ) -or ( ObjectCategory -like 'group' ) -or ( ObjectCategory -like 'publicFolder' ) -or ( ObjectCategory -like'msExchDynamicDistributionList' ) ) -and -not ( customAttribute1 -eq 'student' ) ) ( ( Alias -ne $null ) -and ( ( ( ObjectCategory -like 'person' ) -and ( ObjectClass -eq 'user' ) -and -not ( Database -ne $null ) -and -not ( ServerLegacyDN -ne $null ) ) -or ( ( ObjectCategory -like 'person' ) -and ( ObjectClass -eq 'user' ) -and ( recipientType -eq 'UserMailbox' ) ) -or ( ( ObjectCategory -like 'person' ) -and ( ObjectClass -eq 'contact' ) ) -or ( ObjectCategory -like 'group' ) -or ( ObjectCategory -like 'publicFolder' ) -or ( ObjectCategory -like 'msExchDynamicDistributionList' ) ) -and -not ( customAttribute1 -eq 'student' ) -and -not ( customAttribute10 -eq 'headteacher' ) ) Regards Marty
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now