Monday, April 19, 2021

Exchange Server - Creating addition Global Address List(GAL)

Hi There, 

I hope you are doing well!

I would like to guide you through the process of creating an additional Global address list in the Exchange-Onprem environment. This solution has been tested on Ex2019.

Requirement: Create an additional address book for users who belongs to a different business unit with a different domain name/ different SMTP domain name (Example - mydomain.com). 


Step1:  Create New GAL using the recipient filter to a windows email address like *@mydomain.com

New-GlobalAddressList -Name "AAA Global Address List" -RecipientFilter {((Alias -ne $null) -and (((ObjectClass -eq 'user') -or (ObjectClass -eq 'contact') -or (ObjectClass -eq 'msExchSystemMailbox') -or (ObjectClass -eq 'msExchDynamicDistributionList') -or (ObjectClass -eq 'group') -or (ObjectClass -eq 'publicFolder'))) -and (WindowsEmailAddress -like "*@mydomain.com") )}

Update-GlobalAddressList "AAA Global Address List"


Step2: Create the following Address list like All Users, All Room, All DLs, etc.

- All Distribution Lists

New-AddressList -Name "AAA All Distribution Lists" -RecipientFilter {((Alias -ne $null) -and (ObjectCategory -like 'group') -and (WindowsEmailAddress -like "*@mydomain.com"))}

- All Rooms

New-AddressList -Name "AAA All Rooms" -RecipientFilter {((Alias -ne $null) -and (((RecipientDisplayType -eq 'ConferenceRoomMailbox') -or (RecipientDisplayType -eq 'SyncedConferenceRoomMailbox'))) -and (WindowsEmailAddress -like "*@mydomain.com"))}

- All Users

New-AddressList -Name "AAA All Users" -RecipientFilter {((Alias -ne $null) -and (((((((ObjectCategory -like 'person') -and (ObjectClass -eq 'user') -and (-not(Database -ne $null)) -and (-not(ServerLegacyDN -ne $null)))) -or (((ObjectCategory -like 'person') -and (ObjectClass -eq 'user') -and (((Database -ne $null) -or (ServerLegacyDN -ne $null))))))) -and (-not(RecipientTypeDetailsValue -eq 'GroupMailbox')))) -and (WindowsEmailAddress -like "*@mydomain.com"))}


Step3: Create an Offline Address Book 

New-OfflineAddressBook -Name "AAA Offline Address Book" -AddressLists "AAA Global Address List"
Update-OfflineAddressBook "AAA Offline Address Book" 


Step4: Create an Address Book Policy which we will later apply to the respective business users.

New-AddressBookPolicy -Name "AAA ABP" -AddressLists "AAA All Distribution Lists", "AAA All Users" -RoomList "AAA All Rooms" -OfflineAddressBook "AAA Offline Address Book" -GlobalAddressList "AAA Global Address List"


Step5:  Finally, Apply this policy to a few test accounts to confirm if it's working as expected using the below command. Later, you can apply to all users.

Set-Mailbox -identity Username -AddressBookPolicy "AAA ABP"

Note: After creating this new GAL, If the Email Address Policy is set to default to all users, everyone within the organization will be able to see this new GAL in ADDRESS BOOK. To prevent it, you must apply the new 'Email Address Policy' individually to all users in the different business units (As per the above requirement).

*You may replace the domain - mydomain.com and name format "AAA ---" according to your company naming format.

Feel free to comment if you have any questions or concerns.

Best Regards,
Rahul