Hi Jorg,
According to your description, I understand that you want to create custom contact address list for different department users in Address Book.
If that is the case, we can use
Address Book Policy to achieve it. Address book policies (ABPs) allow you to segment users into specific groups to provide customized views of your organizations global address list (GAL). You can then assign the ABP to mailbox users, providing
them with access to a customized GAL in Outlook and Outlook Web App.
We can create the address list by the following command:
New-GlobalAddressList -Name "GAL for DEPT1" -RecipientFilter {((Alias -ne $null) -and (((ObjectClass -eq 'user') -or (ObjectClass -eq 'msExchDynamicDistributionList') -or (ObjectClass -eq 'group') -or (ObjectClass -eq 'publicFolder'))))}
New-AddressList -Name "Rooms" -RecipientFilter {RecipientTypeDetails -eq 'RoomMailbox'}
New-AddressList -Name "Contacts for DEPT1" -RecipientFilter {RecipientTypeDetails -eq 'MailContact' -and (Department -eq 'DEPT1') }
New-OfflineAddressBook -Name "OAB for DEPT1" -AddressLists "
GAL for DEPT1"
Then create an address book policy for DEPT1:
New-AddressBookPolicy -Name "ABP_DEPT1 " -AddressLists "Contacts for DEPT1",Rooms -OfflineAddressBook "OAB for DEPT1" -GlobalAddressList
"GAL for DEPT1" -RoomList "Rooms"
Finally, assign the ABPs to the users in Department 1:
Get-Mailbox -resultsize unlimited | where {$_.Department -eq "DEPT1"} | Set-Mailbox -AddressBookPolicy "ABP_DEPT1"
For more information about Scenario for Deploying address book policies, please refer to:
https://technet.microsoft.com/en-us/library/jj657455(v=exchg.150).aspx
Regards,