Update Address List Exchange Online PowerShell
Hello,
AddressList in Exchange Online are quite particular. Indeed, when you create them, they are empty, you need to modify a Mailbox to let her “check” if it belong to some address list created after the mailbox creation.Let’s try. I have two room mailboxes with the attribute “Company” set to corp.
Get-Recipient -Filter {RecipientTypeDetails -eq 'RoomMailbox' -and Company -eq 'Corp'}
I want to create an AddressList with those mailboxes.
New-AddressList -Name 'Corp Rooms' -RecipientFilter "((Alias -ne `$null) -and (((RecipientDisplayType -eq 'ConferenceRoomMailbox') -or (RecipientDisplayType -eq 'SyncedConferenceRoomMailbox'))) -and (Company -eq 'Corp') )" -Container 'All Rooms'
I can check the content of the AddressList with:
Get-Recipient -RecipientPreviewFilter (Get-AddressList -Identity 'Corp Rooms').RecipientFilter
We can see our 2 room mailboxes. Now let’s check from a user point of view:
It’s empty ! As a matter of fact, this is a documented “feature”:
So, let’s try to tickle them…
Get-Recipient -Filter {RecipientTypeDetails -eq 'RoomMailbox' -and Company -eq 'Corp'} | Set-Mailbox -Simp
leDisplayName $null
And, voilĂ :
As you can see, if you modify the mailboxes, they will appear in the AddressList they belongs to. This is not something we were used to do in Exchange Onpremise.
Note: You can edit any attribute on the mailboxes, in the example above I used “SimpleDisplayName” because it’s not a visible one, so I don”t need to empty it after populated it like the example on the KB article I linked earlier.
Side note: If you want to group your room mailboxes by location/company, you may want to use the room list feature, I wrote an article about this.