Create Address Book policy with Exchange 2013 and Exchange 2010 SP3
Below outlined steps will create an Address Book policy in Exchange 2013 to make sure Contoso’s address book is only visible to Contoso employees.
Prereq’s:
When a new user is created the user should be stamped with the right email address.
Process:
CMDLets 3 and 4 will find users daily with the right email id – say contoso.com and add CustomAttribute15 to contoso.com to all discovered user’s and assign the appropriate address book.
Simply use a notepad and replace contoso.com to yourdomain.com and CustomAttribute15 to the number you want.
This is the simplest possible form of achieving this task – for complex requirements please adopt other ways.
##################################################################
1. Create Address Lists, Room Lists, GAL, OAB and ABP
New-AddressList -Name “contoso.com_AL” -RecipientFilter {((RecipientType -eq ‘UserMailbox’) -or (RecipientType -eq “MailUniversalDistributionGroup”) -or (RecipientType -eq “DynamicDistributionGroup”)) -and (CustomAttribute15 -eq “contoso.com”)}
New-AddressList -Name “contoso.com_Rooms” -RecipientFilter {(Alias -ne $null) -and (CustomAttribute15 -eq “contoso.com”)-and (RecipientDisplayType -eq ‘ConferenceRoomMailbox’) -or (RecipientDisplayType -eq ‘SyncedConferenceRoomMailbox’)}
New-GlobalAddressList -Name “contoso.com_GAL” -RecipientFilter {(CustomAttribute15 -eq “contoso.com”)}
New-OfflineAddressBook -Name “contoso.com_OAB” -AddressLists “contoso.com_GAL”
New-AddressBookPolicy -Name “contoso.com_ABP” -AddressLists “contoso.com_AL” -OfflineAddressBook “contoso.com_OAB” -GlobalAddressList “contoso.com_GAL” -RoomList “contoso.com_Rooms”
2. Find all users you want to assign the ABP and set CustomAttribute15 to contoso.com
Get-Mailbox -resultsize unlimited | where {$_.EmailAddresses -match “contoso.com”} | Set-Mailbox -CustomAttribute15 “contoso.com”
3. Apply the ABP on all those users
Get-Mailbox -resultsize unlimited | where {$_.CustomAttribute15 -eq “contoso.com”} | Set-Mailbox -AddressBookPolicy “contoso.com_ABP”
4. Schedule script 2 and 3 to be run daily using task Scheduler
##################################################################
Ratish Nair
Microsoft MVP | Exchange Server
Team @MSExchangeGuru
February 8th, 2015 at 5:55 pm
[…] Create Address Book policy with Exchange 2013 and Exchange 2010 SP3 – […]
February 8th, 2015 at 5:56 pm
[…] Create Address Book policy with Exchange 2013 and Exchange 2010 SP3 – […]
August 6th, 2016 at 2:42 am
Hi
Unable to create Address Book Policy without RoomList in exchange 2013 EMS and even though tried but unable to create RoomList
August 12th, 2016 at 2:07 pm
We can help. Contact our professional services. info@GoldenFive.net