Exchange Online - Room Settings
When migrating to Exchange Online, default settings for room mailboxes don’t allow others users than the “booker” to see information about the booking. This is a fast rundown of how I changed some permissions to allow users to see who booked the room.
Connecting to Exchange Online
Start with connecting to Exchange Online
$UserCredential = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
Import-PSSession $Session -DisableNameChecking
Get ROOM mailboxes
Get all mailboxes of type room
$Rooms = Get-Mailbox -Filter "ResourceType -eq 'Room'"
Show property values
Show a simple list
$Rooms
Show a list with choosen properties
$Rooms | Select Name, Alias, SamAccountName, WhenMailboxCreated, WhenChanged | format-table
Show calender processing for a ROOM mailbox
Get-CalendarProcessing -Identity "My Meeting Room - First Floor" | Select *
Set calender processings settings for a ROOM mailbox
In this case, we are extending the booking window to 545 days
Set-CalendarProcessing -Identity "My Meeting Room - First Floor" -BookingWindowInDays 545
Set booking window on all rooms retrieve earlier
By piping to the foreach commandlet, we are now setting the Booking Window to 545 days on all room retrieved
$Rooms | ForEach-Object { Set-CalendarProcessing -Identity $_.Alias -BookingWindowInDays 545}
Get calendar settings from all mailboxes
Pipe all mailboxes ($Room) to the foreach commandlet to get selected settings from the mailboxes
$Rooms | ForEach-Object { Get-CalendarProcessing -Identity $_.Alias | Select Identity, BookingWindowInDays, MaximumDurationInMinutes,AllowConflicts}
Get Mailbox Folder Permissions
Get-MailboxFolderPermission -Identity "My Meeting Room - First Floor"
Set permissions on Mailbox
The variable; $MBox is a name of a mailbox. And the access right, ‘LimitedDetails’ means that users are able to see who booked the room. But not the title or other information.
$MBox = "My Meeting Room - First Floor"
Set-MailboxFolderPermission -Identity "$($CalName):\calendar" -User default -AccessRights LimitedDetails
Set permissions on all calendars/mailboxes
Pipe to foreach to set the accessright on all mailboxes/calendars
$Rooms | ForEach-Object {Set-MailboxFolderPermission -Identity "$($_.Alias):\calendar" -User default -AccessRights LimitedDetails}