Unfortunately, Exchange 2019 only offers a few settings for resource mailboxes (room and device mailboxes) in the Exchange Administrative Center. Many settings for booking permissions or calendar settings can only be managed via the Exchange Management Shell.
Create resource mailboxes with the Exchange Management Shell
With small PowerShell scripts, resource mailboxes can be created quickly and always according to the same scheme. Here are two examples for a room mailbox and a device mailbox. These two cases have often been requested by readers. On the one hand, a meeting room should only be bookable by certain people. A device mailbox, which is used as a vacation calendar, should accept bookings from several people at the same time.
Room mailboxes
Room mailboxes can be created easily using the Exchange Management Shell. One line is sufficient to create a room mailbox:
New-Mailbox -Alias ITRoom1 -Name "IT Besprechungsraum" -Room
Das neu erstellte Raumpostfach „IT Besprechungsraum“ hat nun die folgenden Kalendereinstellungen:
Die Standard Einstellung zu „AutomateProcessing“ sind aber nicht ideal, denn der Raum soll ja valide Buchungsanfragen automatisch annehmen. Wenn nun aber die Einstellung zu „AutomateProcessing“ von „AutoUpdate“ zu „AutoAccept“ umgestellt wird, akzeptiert das Raumpostfach von allen Exchange Benutzern Buchungsanfragen.
Mit dem folgenden Befehl akzeptiert das Raumpostfach automatisch nur noch Buchungsanfragen von Mitgliedern der Gruppe „IT_Department“:
Set-CalendarProcessing ITRoom1 -AutomateProcessing AutoAccept -BookInPolicy IT_Department -AllBookInPolicy $false
The necessary settings for room mailboxes can be automated using a small PowerShell script:
$RoomMailboxName = "Marketing Besprechungsraum"
$RoomMailboxAlias = "Marketing_Besprechungsraum"
$RaumMailboxBookInPolicy = "Marketing_Department"
$NewRoomMailbox = New-Mailbox -Alias $RoomMailboxAlias -Name $RoomMailboxName -Room
$NewRoomMailbox | Set-CalendarProcessing -AutomateProcessing AutoAccept -BookInPolicy $RaumMailboxBookInPolicy -AllBookInPolicy $false
Get-CalendarProcessing $NewRoomMailbox | fl
Mit diesem einfachen Beispiel wird ein Raumpostfach mit dem Anzeigenamen „Marketing Besprechungsraum“ und dem Alias „Marketing_Besprechungsraum“ erzeugt. Dann wir der Verteilergruppe „Marketing Department“ die Buchungsberechtigung zugewiesen. So dürfen nur noch Mitglieder der Gruppe „Marketing Department“ den Raum buchen:
Further parameters can be easily added to the script and adapted to your own requirements. For example, by default, the room mailbox only accepts booking requests that do not exceed 24 hours (MaximumDurationInMinutes=1440). If longer periods are to be accepted, the script can be changed as follows, for example:
$RoomMailboxName = "Marketing Besprechungsraum"
$RoomMailboxAlias = "Marketing_Besprechungsraum"
$RaumMailboxBookInPolicy = "Marketing_Department"
$NewRoomMailbox = New-Mailbox -Alias $RoomMailboxAlias -Name $RoomMailboxName -Room
$NewRoomMailbox | Set-CalendarProcessing -AutomateProcessing AutoAccept -BookInPolicy $RaumMailboxBookInPolicy -AllBookInPolicy $false -MaximumDurationInMinutes 7200
Get-CalendarProcessing $NewRoomMailbox | fl
In this way, every parameter for the calendar settings can be changed in one step. Room mailboxes can therefore always be created according to the same scheme.
Device mailboxes
Device mailboxes can be set up in the same way as room mailboxes, but they often require slightly different settings. Device mailboxes are often used for all types of calendars, not just devices such as projectors or vehicles, but also frequently for vacation calendars.
A device mailbox can be created using the following command:
New-Mailbox -Alias Urlaubskalender -Name "Urlaubskalender" -Equipment
Here too, the booking settings are usually not ideal, for example, the calendar should accept booking requests directly and, in the case of a vacation calendar, also allow several people to book at the same time. In addition, longer booking periods are common for vacation calendars. As with room mailboxes, the settings can therefore be adjusted:
Set-CalendarProcessing VacationCalendar -AutomateProcessing AutoAccept -MaximumDurationInMinutes 40230 -AllowConflicts $true
These settings can also be automated with a small PowerShell script. If desired, the booking can also be restricted to certain groups. Here is an example:
$EquipmentMailboxName = "Urlaubskalender Marketing"
$EquipmentMailboxAlias = "Urlaub_Marketing"
$EquipmentMailboxBookInPolicy = "Marketing_Department"
$NewEquipmentMailbox = New-Mailbox -Alias $EquipmentMailboxAlias -Name $EquipmentMailboxName -Room
$NewEquipmentMailbox | Set-CalendarProcessing -AutomateProcessing AutoAccept -MaximumDurationInMinutes 40230 -AllowConflicts $true -BookInPolicy $EquipmentMailboxBookInPolicy
Get-CalendarProcessing $NewEquipmentMailbox | fl
These small scripts can be saved on the Exchange server, for example, and can be easily adapted and executed as required.