Solved

how to edit Global Address List Recipient filter

Posted on 2013-05-22
4
6,573 Views
Last Modified: 2013-05-22
Hi
Can someone assist me with my powershell syntax...

When we create new GAL's for each client on our Exchange 2010 system  we run the following powershell script...
New-GlobalAddressList -Name "ClientX - GAL" -ConditionalCustomAttribute1 "ClientX" -IncludedRecipients MailboxUsers,MailGroups -RecipientContainer "domain.local/clients/ClientX"

We use this as we find clients like to see all users and distribution groups in the same place when they look at the address book in Outlook.  They moan when they have to navigate through to the folders in the tree on the left... *sigh* users will be users.
They have now asked us to add some Mail Contacts to the same place
So my question is this.. how to I edit the GAL to add the filter to include mailcontacts too?

I'm guessing I need to start with get-GlobalAddressList "ClientX - Gal".
I'm just unsure of the command to add the mailcontacts recipient filter.

Thanks
Gareth
0
Comment
Question by:ChallowSupport
  • 2
  • 2
4 Comments
 
LVL 12

Expert Comment

by:SreRaj
Comment Utility
Please try the following command. Only modification made is the addition of 'MailContacts' in IncludedRecipients. Please verify the contacts are having CustomAttribute1 set as ClientX and they exist in the path domain.local/clients/ClientX

New-GlobalAddressList -Name "ClientX - GAL" -ConditionalCustomAttribute1 "ClientX" -IncludedRecipients MailboxUsers,MailGroups,MailContacts -RecipientContainer "domain.local/clients/ClientX"

Open in new window

0
 

Author Comment

by:ChallowSupport
Comment Utility
Hi SreRaj

yes I can confirm that the contacts have the customattribute1 set as ClientX.  However your command does not work.  I suspect because the GAL already exists (see error below).  I would have thought I need a command something like get-GlobalAddressList "ClientX - Gal" | add-recipientfilter etc?

[PS] C:\Windows\system32>New-GlobalAddressList -Name "ClientX - GAL" -ConditionalCustomAttribute1 "ClientX" -IncludedRecipients
MailboxUsers,MailGroups,MailContacts -RecipientContainer "Domain.local/clients/ClientX"
Active Directory operation failed on DOMAINDC01.DOMAIN.LOCAL. The object 'CN=ClientX - GAL,CN=All Global Address Lists,CN=A
ddress Lists Container,CN=First Organization,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=DOMAIN,DC=LOCAL' alr
eady exists.
    + CategoryInfo          : NotSpecified: (0:Int32) [New-GlobalAddressList], ADObjectAlreadyExistsException
    + FullyQualifiedErrorId : 10EB12F8,Microsoft.Exchange.Management.SystemConfigurationTasks.NewGlobalAddressList

Regards
Gareth
0
 
LVL 12

Accepted Solution

by:
SreRaj earned 500 total points
Comment Utility
Since we are modifying existing GAL, we should be using Set-GlobalAddressList. Please find the command as follows.

Set-GlobalAddressList -Name "ClientX - GAL" -ConditionalCustomAttribute1 "ClientX" -IncludedRecipients MailboxUsers,MailGroups,MailContacts -RecipientContainer "domain.local/clients/ClientX"

Open in new window

0
 

Author Comment

by:ChallowSupport
Comment Utility
Perfect you are a star!... although you don't need -name

Set-GlobalAddressList "ClientX - GAL" -ConditionalCustomAttribute1 "ClientX" -IncludedRecipients MailboxUsers,MailGroups,MailContacts -RecipientContainer "domain.local/clients/ClientX"

Many thanks!
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Utilizing an array to gracefully append to a list of EmailAddresses
Easy CSR creation in Exchange 2007,2010 and 2013
In this video we show how to create a mailbox database in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Servers >> Data…
To show how to generate a certificate request in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.:  First we need to log into the Exchange Admin Center. Navigate to the Servers >> Certificates‚Ķ

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now