Add contacts to GAL

Hi,

I created a new GAL using New-GlobalAddressList command , it executed finely. Now i want to add contacts to that perticular GAL. How can i do that. In more detail i have multiple GAL's like GAL1 , GAL2 , GAL3 . I want to import contacts to GAL1 only and those contacts will not be accessible by GAL2. Suggest me a solution in powershell.

Thanks in advance

September 9th, 2015 4:17am

Set-GlobalAddressList GAL1 -IncludedRecipients MailboxUsers,MailContacontacts

https://technet.microsoft.com/en-us/library/bb123877(v=exchg.150).aspx

Free Windows Admin Tool Kit Click here and download it now
September 9th, 2015 4:56am

Hi Prima,

You should read about GAL Segmentation feature using Address Book Policies ABPs.

ABPs create only a virtual separation of users from a directory perspective, not a legal separation.

Address book policies:

https://technet.microsoft.com/en-us/library/hh529948%28v=exchg.150%29.aspx?f=255&MSPPError=-2147217396

Exchange 2010 GAL Segmentation:

http://blogs.technet.com/b/omers/archive/2011/01/30/exchange-2010-gal-segmentation.aspx

Also you can filter users in the GAL using -IncludedRecipients MailboxUsers -ConditionalCompany Contoso or -RecipientFilter {CustomAttribute15 -like "AgencyA"}

Or  Use the Set-GlobalAddressList cmdlet to modify the attributes in Active Directory for a global address list (GAL).

Set-GlobalAddressList:

https://technet.microsoft.com/en-us/library/bb123877(v=exchg.150).aspx

September 9th, 2015 5:01am

Thanks for your reply... My problem is i want to add a contact to GAL1 . Lets assume i have a mail contacts as Mailcontact1 , Mailcontact2 , Mailcontact3 etc. Now i want to add the Mailcontact3 to GAL1 . How can i do that in powershell? Also is this contacts will be visible in other GAL as well?

  • Edited by Prima-d 22 hours 20 minutes ago
Free Windows Admin Tool Kit Click here and download it now
September 9th, 2015 5:04am

Any example on how can i do that GAL segmentation in powershell?

September 9th, 2015 5:08am

Thanks for your reply... My problem is i want to add a contact to GAL1 . Lets assume i have a mail contacts as Mailcontact1 , Mailcontact2 , Mailcontact3 etc. Now i want to add the Mailcontact3 to GAL1 . How can i do that in powershell? Also is this contacts will be visible in other GAL as well?

You can assign an custom attribute to GAL1, i.e.

Set-GlobalAddressList GAL1 -ConditionalCustomAttribute11 GAL1

For whichever recipient you want it to be appeared in GAL1, set the custom attribute 11 as 'GAL1'.

Free Windows Admin Tool Kit Click here and download it now
September 9th, 2015 5:57am

If you want to add just one user you can use recipientfilter parameter with alias but in that case your GAL is limited to only that one particular record. By default all recipients are visible in default GAL, and if you want multiple GALs for different users you can you filtering as well as others say. You can even use address book policy to limit users to see only certan GAL(s)
September 9th, 2015 6:33am

You can assign an custom attribute to GAL1, i.e.
Set-GlobalAddressList GAL1 -ConditionalCustomAttribute11 GAL1
For whichever recipient you want it to be appeared in GAL1, set the custom attribute 11 as 'GAL1'.

You mean while adding a contact i need to pass customattribute as GAL1??

Free Windows Admin Tool Kit Click here and download it now
September 9th, 2015 7:09am

Hi Prima,

GAL is not a editable list like a distribution list, where you can manually add remove users. Its automatically populated using the conditions or filters that you set.

Like the examples given by me and Li.

Condition is if the contacts customattribute11 contains GAL1 then make it automatically part of GAL1.

So for it to work you need to run these additional commands.

#Set Custom attribute on the contacts
Get-MailContact Mailcontact* | Set-MailContact CustomAttribute11 "GAL1"

#Force auto population of the information
Update-GlobalAddressList -Identity "GAL1"

Otherwise you can change the GAL1 as this

#Change the GAL1 filter.
Set-GlobalAddressList GAL1 -RecipientFilter {Name -like "MailContact*"}

#Force auto population of the information
Update-GlobalAddressList -Identity "GAL1"

September 9th, 2015 8:36am

You can assign an custom attribute to GAL1, i.e.
Set-GlobalAddressList GAL1 -ConditionalCustomAttribute11 GAL1
For whichever recipient you want it to be appeared in GAL1, set the custom attribute 11 as 'GAL1'.

You mean while adding a contact i need to pass customattribute as GAL1??


You set the value of customer attribute as 'GAL1' or whatever other string you like. This is the best way to control which recipient should appear in which GAL.
Free Windows Admin Tool Kit Click here and download it now
September 9th, 2015 9:49am

I tried the commands that you suggested but how can i get the list of contacts in GAL? In web interface those are not accessible. i followed the following steps

I created GAL with customattribute2 equals to 'alumni' . While creating an mail contact i added the custom attribute2 as 'alumni' but how can i access this contact in this perticular GAL?

I tried another method as well.

http://blogs.msdn.com/b/ukeducloud/archive/2013/04/15/alumni-address-book-policy-in-office-365-education.aspx

Based on this link , i created address list and added that to GAL. but that is also not listing my contacts to the Addresslist. Why?

September 9th, 2015 11:55pm

Yes, you can have a preview in EAC. Just open the GAL you created and click on 'Preview recipients' link
Free Windows Admin Tool Kit Click here and download it now
September 10th, 2015 12:16am

I didn't found my GAL under recipients-->groups , Where i can check exactly?
September 10th, 2015 12:35am

Hi Prima,

"i created address list and added that to GAL", I'm not sure how you did that.

The article is excellent and shows  adding the address list, GAL and offline AB to a AddressBookPolicy (which is not same as GAL).

As Li mentioned you can preview the GAL using EAC. Otherwise you can use the account having that GAL assigned, Outlook and check the address book.(it would take a day or 2 though)

Please note the GAL update takes upto 48hrs sometimes, depending upon the generation cycle and Outlook donwload times.

View the Members of an Address List by Using the Exchange Management Shell

Please read more about GAL,AddressList,ABPs,OABs all these terms are different but inter-related. THis will help you understand what you are trying to achieve.

Free Windows Admin Tool Kit Click here and download it now
September 10th, 2015 12:41am

I didn't found my GAL under recipients-->groups , Where i can check exactly?

GAL is at organization -> address list

Address list and global address list are totally different from group.

September 10th, 2015 2:31am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics