Solved

how to edit Global Address List Recipient filter

Posted on 2013-05-22
4
7,611 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Independent Software Vendors: 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

Suggested Solutions

This process describes the steps required to Import and Export data from and to .pst files using Exchange 2010. We can use these steps to export data from a user to a .pst file, import data back to the same or a different user, or even import data t…
This article lists the top 5 free OST to PST Converter Tools. These tools save a lot of time for users when they want to convert OST to PST after their exchange server is no longer available or some other critical issue with exchange server or impor…
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
This video demonstrates how to sync Microsoft Exchange Public Folders with smartphones using CodeTwo Exchange Sync and Exchange ActiveSync. To learn more about CodeTwo Exchange Sync and download the free trial, go to: http://www.codetwo.com/excha…

739 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