1、使用 Exchange 命令行管理程序安装和配置通讯簿策略路由代理 Install-TransportAgent -Name "ABP Routing Agent" -TransportAgentFactory "Microsoft.Exchange.Transport.Agent.AddressBookPolicyRoutingAgent.AddressBookPolicyRoutingAgentFactory" -AssemblyPath $env:ExchangeInstallPath\TransportRoles\agents\AddressBookPolicyRoutingAgent\Microsoft.Exchange.Transport.Agent.AddressBookPolicyRoutingAgent.dll

2、给部分用户添加自定义属性

3、创建地址列表 New-AddressList -Name "ALL_A_Users_DGs" -RecipientFilter "((RecipientType -eq 'UserMailbox') -or (RecipientType -eq 'MailUniversalDistributionGroup') -or (RecipientType -eq 'DynamicDistributionGroup')) -and (CustomAttribute15 -eq 'A') -or (CustomAttribute15 -eq 'CEO')"

New-AddressList -Name "AL_A_Contacts" -RecipientFilter "(RecipientType -eq 'MailContact') -and (CustomAttribute15 -eq 'A')"

New-AddressList -Name "ALL_B_Users_DGs" -RecipientFilter "((RecipientType -eq 'UserMailbox') -or (RecipientType -eq 'MailUniversalDistributionGroup') -or (RecipientType -eq 'DynamicDistributionGroup')) -and (CustomAttribute15 -eq 'B') -or (CustomAttribute15 -eq 'CEO')"

New-AddressList -Name "AL_B_Contacts" -RecipientFilter "(RecipientType -eq 'MailContact') -and (CustomAttribute15 -eq 'B')"

4、创建会议室列表 New-AddressList -Name AL_A_Rooms -RecipientFilter "(CustomAttribute15 -eq 'A') -and (RecipientDisplayType -eq 'ConferenceRoomMailbox') -or (RecipientDisplayType -eq 'SyncedConferenceRoomMailbox')"

New-AddressList -Name AL_B_Rooms -RecipientFilter "(CustomAttribute15 -eq 'B') -and (RecipientDisplayType -eq 'ConferenceRoomMailbox') -or (RecipientDisplayType -eq 'SyncedConferenceRoomMailbox')"

5、创建 Gal

New-GlobalAddressList -Name "GAL_A" -RecipientFilter "(CustomAttribute15 -eq 'A') -or (CustomAttribute15 -eq 'CEO')"

New-GlobalAddressList -Name "GAL_B" -RecipientFilter "(CustomAttribute15 -eq 'B') -or (CustomAttribute15 -eq 'CEO')"

6、创建 Oab New-OfflineAddressBook -Name "OAB_A" -AddressLists "GAL_A"

New-OfflineAddressBook -Name "OAB_B" -AddressLists "GAL_B"

7、创建通讯簿策略

New-AddressBookPolicy -Name "ABP_A" -AddressLists "ALL_A_Users_DGs","AL_A_Contacts" -OfflineAddressBook "\OAB_A" -GlobalAddressList "\GAL_A" -RoomList "\AL_A_Rooms"

New-AddressBookPolicy -Name "ABP_B" -AddressLists "ALL_B_Users_DGs","AL_B_Contacts" -OfflineAddressBook "\OAB_B" -GlobalAddressList "\GAL_B" -RoomList "\AL_B_Rooms"

New-AddressBookPolicy -Name "ABP_CEO" -AddressLists "ALL_A_Users_DGs","AL_A_Contacts","ALL_B_Users_DGs","AL_B_Contacts" -OfflineAddressBook "\默认脱机通讯簿" -GlobalAddressList "\默认全局地址列表" -RoomList "\All-Rooms"

#客户端演示