Solved

how to edit Global Address List Recipient filter

Posted on 2013-05-22
4
7,441 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
ID: 39187057
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
ID: 39187128
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
ID: 39187288
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
ID: 39187512
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

We are happy to announce a brand new addition to our line of acclaimed email signature management products – CodeTwo Email Signatures for Office 365.
This article explains how to install and use the NTBackup utility that comes with Windows Server.
In this video we show how to create a Shared Mailbox 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 Recipients >> Sha…
In this video we show how to create a Resource Mailbox in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: Navigate to the Recipients >> Resources tab.: "Recipients" is our default selection …

679 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