Exchange 2013 | Domain separated Global Address list

When you use in a multiple domain organization. For example you need to separate the Global Address List as the other users from domain X are not allowed to see the address list of domain Y. You can create a new address list + Address List Policy.
01: First you have a add a custom attribute to the users of a OU or a Mailbox Database (you need to create multilple databases (per domain))
Open Powershell.

Get-mailbox –database “DomainX” | Set-mailbox –customattribute15 “DomainX”

With this command you add the customized attribute to the users which need the separated address list.
02: Next we create an address list for rooms.

New-AddressList -Name DomainX_Rooms -RecipientFilter {(Alias -ne $null) -and (CustomAttribute15 -eq “DomainX “)-and (RecipientDisplayType -eq ‘ConferenceRoomMailbox’) -or (RecipientDisplayType -eq ‘SyncedConferenceRoomMailbox’)}

Screen Shot 2014-12-13 at 11.27.53
02b: If you need to update this address list use the command: update-addresslist “DomainX_Rooms”
02c: For the contacts I used the GUI to add these to the users (this is because I need to change the settings for that address list after a migration from 2007) However if you have already 2010 or 2013 you can select an OU for this contact address list.
03: Next we create an address list for the users

New-AddressList -Name “DomainX_Users” -RecipientFilter {((RecipientType -eq “UserMailbox”) -or (RecipientType -eq “MailUniversalDistributionGroup”) -or (RecipientType -eq “DynamicDistributionGroup”)) -and (CustomAttribute15 -eq “DomainX”)}

Screen Shot 2014-12-13 at 11.28.0604: The next step will be creating the Global Address List

New-GlobalAddressList -Name “DomainX_GAL” -RecipientFilter {(CustomAttribute15 -eq “DomainX”)}

Screen Shot 2014-12-13 at 11.29.13
05: Next we make the offline address book short OAB. For this address book you need the use the GlobalAddressList (GAL)

New-OfflineAddressBook -Name “OAB_DomainX” -AddressLists “DomainX_GAL”

Screen Shot 2014-12-13 at 11.30.0106: After the OAB we create a new AddressBookPolicy (ABP) a policy which which can give to an User of DomainX.

New-AddressBookPolicy -Name “DomainX_ABP” -AddressLists “DomainX_Users”,”DomainX_Contacts” -OfflineAddressBook “\OAB_DomainX” -GlobalAddressList “\DomainX_GAL” -RoomList “\DomainX_Rooms”

Screen Shot 2014-12-13 at 11.33.48
07:  To set the AddressBookPolicy for all the users with the CustomAttribute15 DomainX you have to use the following command.

Get-Mailbox -resultsize unlimited | where {$_.CustomAttribute15 -eq “DomainX”} | Set-Mailbox -AddressBookPolicy “DomainX_ABP”

For more information:

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.