Procedure to Isolate a GAL Without Using EMC
This guide explains how to isolate a Global Address List (GAL) in Microsoft Exchange using PowerShell only, without relying on the Exchange Management Console (EMC).
Required parameters
- ou_name: organizational unit name
- gal_name: name for the GAL and associated objects
- attribute_name: value assigned to the AD custom attribute (e.g., CustomAttribute1)
- domain_name: fully qualified domain name (e.g., domain.local)
1. Create the Global Address List (GAL)
New-GlobalAddressList "gal_name-GAL" -ConditionalCustomAttribute1 "attribute_name-CA" -IncludedRecipients "AllRecipients"
2. Create the Address List (AL)
New-AddressList -Name 'gal_name-AL' -RecipientContainer 'domain_name' -IncludedRecipients 'AllRecipients' -ConditionalCustomAttribute1 'attribute_name-CA' -Container '\' -DisplayName 'gal_name-AL'
3. Create the Room List
New-AddressList -Name 'gal_name-ROOMS' -RecipientFilter {
(Alias -ne $null) -and (CustomAttribute1 -eq "attribute_name-CA") -and
(RecipientDisplayType -eq "ConferenceRoomMailbox") -or
(RecipientDisplayType -eq "SyncedConferenceRoomMailbox")
}
4. Create the Offline Address Book (OAB)
New-OfflineAddressBook -Name 'gal_name-OAB' -AddressLists "gal_name-GAL"
5. Create the Address Book Policy (ABP)
New-AddressBookPolicy -Name 'gal_name-ABP' -GlobalAddressList '\gal_name-GAL' -OfflineAddressBook '\gal_name-OAB' -RoomList '\gal_name-ROOMS' -AddressLists '\gal_name-AL'
6. Assign the custom attribute to users
Get-Mailbox -OrganizationalUnit "ou_name" | Set-Mailbox -CustomAttribute1 "attribute_name-CA"
7. Apply the Address Book Policy to users
Get-Mailbox -OrganizationalUnit "ou_name" | Set-Mailbox -AddressBookPolicy "gal_name-ABP"
Note
Make sure the CustomAttribute1 value is already configured and consistent in the users' Active Directory profiles before applying the Address Book Policy.