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"))}