Jump to content

Recommended Posts

Posted

Hiya,

 

So I've followed the instructions here: https://www.azure365pro.com/how-to-implement-address-book-policies-in-office-365exchange-20132016-effectively/

 

But instead of custom attributes I've tried to apply using the department 'Student'

 

New-GlobalAddressList -Name "Student-GAL" -RecipientFilter {(Department -eq "Student")}

 

New-AddressList -Name "Student-AL" -RecipientFilter {((RecipientType -eq 'UserMailbox') -or (RecipientType -eq "MailUniversalDistributionGroup") -or (RecipientType -eq "DynamicDistributionGroup")) -and (Department -eq "Student")}

 

New-AddressList -Name Student-Rooms -RecipientFilter {(Alias -ne $null) -and (Department -eq "Student")-and (RecipientDisplayType -eq 'ConferenceRoomMailbox') -or (RecipientDisplayType -eq 'SyncedConferenceRoomMailbox')}

 

New-OfflineAddressBook -Name "Student-OAB" -AddressLists "Student-GAL"

 

PS C:\Users\Richard\Downloads> New-AddressBookPolicy -Name "Student-ABP" -AddressLists "\Student-AL" -OfflineAddressBook "\Student-OAB" -GlobalAddressList "\Student-GAL" -RoomList "\Student-Rooms"

 

 

The commands worked but the final policy isn't applied to students unless you manually do it in exchange admin centre, I assumed this should be auto applied because they're in the department 'student'.

 

Even when the policy is applied per-user in Exchange admin centre the students can still see the default GAL as well as the new student GAL.

 

Basically I was trying to make life easy and have all the staff on the default GAL and students on their own GAL so they could only see each other.

Posted
We did this back in 2015, however I haven't looked at it since. At the time I contacted Office 365's support and they did it for us. Maybe try that, as it's an Office 365 related question?
Posted

You do need to assign the Mailbox policy to users even after setting up the GAL. Below is the code we use to ensure students get the mailbox policy once their exchange account is created.

 

$users = Get-Mailbox -ResultSize Unlimited | Where-Object {$_.UserPrincipalName -like "STU????-*" -and $_.AddressBookPolicy -eq $null}

if (($users)){
   
   #For each user we found, we will loop thought them and apply settings
   Write-Host "Set Exchange Policy"
   foreach ($user in $users)
   {
       #for debug purpose we write out their name
       write-Host $user.UserPrincipalName
       #Set their Address book, role assignment and sharing policy to be the student related one
   	Set-Mailbox -Identity $user.UserPrincipalName -AddressBookPolicy "ABP_Students" -RoleAssignmentPolicy "Pupil Role Assignment Policy" -SharingPolicy "Pupil Sharing Policy"
       #Set the OWA Mailbox Policy
       Set-CASMailbox -Identity $user.UserPrincipalName -OwaMailboxPolicy "Pupils"
   }
}

  • Thanks 1
Posted

The commands you ran originally only setup the address book and told it the data that should be included in it.

 

You always have to assign that new mailbox to users either via powershell, or for the Exchange admin panel for each user.

 

Although the custom address books are a pain to get setup in the first instance, it does make it easier to try and limit what appears for some users purely from a housekeeping point of view. ie, students might not need to see rooms/resources in their address book where as staff do.

  • Thanks 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...