?
Solved

how to edit Global Address List Recipient filter

Posted on 2013-05-22
4
Medium Priority
?
8,298 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 2000 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

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

If you troubleshoot Outlook for clients, you may want to know a bit more about the OST file before doing your next job. IMAP can cause a lot of drama if removed in the accounts without backing up.
I don't pretend to be an expert at this, but I have found a few things that are useful. I hope that sharing them here will help others, so they will not have to face some rather hard choices. Since I felt this to be a topic of enough importance and…
In this video we show how to create a Contact 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 >> Contact ta…
In this video we show how to create an Accepted Domain 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 Mail Flow >> Ac…

719 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