A Quick Guide to Manage Room Mailbox Using PowerShell

A Quick Guide to Manage Room Mailbox Using PowerShell

Managing meeting spaces in today’s fast-moving business environment can be a daunting task. To streamline the process, organizations often use a resource mailbox in Exchange Online. This mailbox represents conference rooms, projectors, or other resources that can be scheduled for meetings or events. Managing resource mailboxes is important to ensure the efficient use of meeting spaces and avoid scheduling conflicts. Fortunately, PowerShell can help simplify managing resource mailboxes in Exchange Online.


What is a Resource Mailbox in Exchange Online?

A resource mailbox in Exchange Online is a particular type of mailbox representing resources that can be scheduled for meetings or events. Resource mailboxes are further classified into two categories: room mailboxes and equipment mailboxes, each serving a specific purpose. While a Room mailbox is used to reserve a meeting space, an Equipment mailbox is used to reserve equipment needed for a meeting.

In this guide, we’ll walk through the basics to manage room mailbox using PowerShell, which involves creating and configuring room mailboxes, assigning permissions, and setting up booking policies.


What is Room Mailbox in Exchange Online?

A room mailbox in Office 365 is a type of mailbox that is associated with a physical location, such as a conference room or a shared workspace. It is used to manage the scheduling and booking of the room for meetings and other events. 

Room mailboxes have a calendar that can be used to schedule and manage appointments and bookings for the associated space. This allows scheduling and management of rooms in Exchange Online, making it easier for organizations to optimize the use of meeting spaces.


Manage Room Mailbox Using PowerShell

You must first install and connect to Exchange Online PowerShell using an Exchange Online administrator account to manage room mailbox using PowerShell. Managing room mailboxes can help organizations streamline the process of booking and scheduling meetings in a more efficient manner. Managing room mailboxes in Exchange Online can be simplified using PowerShell commands. Below are the operations to manage room mailboxes using PowerShell. 


How to Create a Room Mailbox Using PowerShell? 

To create a room mailbox in Office 365 using PowerShell, you must run the following command with the appropriate parameters. 

New-Mailbox -Name <RoomMailboxName> -Room

Create room mailbox using PowerShell

Create Multiple Room Mailboxes from CSV Using PowerShell

To create multiple room mailboxes using PowerShell, you can use a CSV file with the list of mailboxes to be created and their parameters. The CSV file should contain the following columns: RoomName, EmailAddress, and Capacity. 

CSV Format to Create Multiple Mailboxes

The following PowerShell cmdlet can be used to create multiple room mailboxes based on the CSV file. 

Import-csv D:\"Room Mailbox".csv | foreach{ New-Mailbox -Name $_.RoomName -Room -PrimarySmtpAddress $_.EmailAddress -ResourceCapacity $_.Capacity }

Bulk room mailbox creation using PowerShell


Change Room Mailbox Properties Using PowerShell

PowerShell commands can be used to modify various mailbox properties, such as display names, email addresses, capacity, and more. Administrators can automate the process of changing room mailbox properties and ensure consistency in the configuration of multiple mailboxes using PowerShell. 


Change Display Name and Capacity of a Room Mailbox

With Exchange Online PowerShell, you can change the display name, the primary SMTP address (default reply address), and the capacity of a room mailbox. Moreover, the previous reply address is kept as a proxy address.

Set-Mailbox <RoomMailboxName> -DisplayName <NewRoomMailboxName> -EmailAddresses SMTP:<OldSMTPAddress>,SMTP: <NewSMTPAddress> -ResourceCapacity <CapacityCount> 

For example, 

Set-Mailbox "New Room Mailbox" -DisplayName "Room Mailbox" -EmailAddresses SMTP:[email protected],SMTP:RoomMailbox@contoso.com -ResourceCapacity 12 


Configuring Room Mailboxes to Allow Booking Requests During Working Hours 

The following PowerShell command can configure all the room mailboxes to allow scheduling booking requests only during working hours. The “MaximumDurationInMinutes” parameter is used to set the maximum duration for meetings. 

In the example below, any meeting requests exceeding 420 minutes (7 hours) in duration will be automatically declined. This can help to ensure that rooms are available for a meeting only for a maximum of 7 hours.

Get-Mailbox -ResultSize unlimited -Filter "RecipientTypeDetails -eq 'RoomMailbox'" | Set-CalendarProcessing -ScheduleOnlyDuringWorkHours $true -MaximumDurationInMinutes 420 


Enable Automatic Booking for Room Mailbox

Enabling automatic booking for a room in Exchange Online enables the room to automatically accept meeting requests without requiring administrator approval. You can use the following cmdlet to enable automatic booking for a room mailbox.

Set-CalendarProcessing <RoomMailboxName> -AutomateProcessing AutoAccept

To enable automatic booking for all room mailboxes, you can execute the following cmdlet.

Get-MailBox | Where {$_.ResourceType -eq "Room"} | Set-CalendarProcessing -AutomateProcessing:AutoAccept  


Assign Room Mailbox Delegate Permissions Using PowerShell

When you assign the “Send As” delegate permission to a user for a room mailbox, the user will be able to send an email from that mailbox as if it was sent by the mailbox owner. This means that the mailbox owner’s email address will appear as the sender’s address to the recipient. To assign the “Send As” permission to a user, you can use the following PowerShell cmdlet.

Add-RecipientPermission <RoomMailboxName> -Trustee <UPN> -AccessRights SendAs -Confirm: $False  

Assign Room Mailbox Send As Delegate Permissions


You can use the below cmdlet to provide “Full Access permission” for a room mailbox to a specific user. 

Add-MailBoxPermission <RoomMailboxName> -User <UPN> -AccessRights FullAcces

Assign Room Mailbox Full Access Delegate Permission


Allow Conflicting Meetings for Automatic Booking

To enable a room mailbox to automatically accept conflicting meeting requests in Exchange Online, you can use the following PowerShell command.

Set-CalendarProcessing -Identity <RoomMailboxName> -AllowConflicts $true 

This will enable the automatic booking feature for a room mailbox, allowing meetings to be scheduled for the room even if conflicting meetings are already scheduled.


Get Details About Room Mailboxes  

You can retrieve and display the information related to room mailboxes in an Exchange Online environment including mailbox properties, calendar settings, permission settings, and delegate information using Exchange Online PowerShell. By obtaining details about room mailboxes, administrators can manage and configure these resources to meet the needs of their organization. 


Display List of Room Mailboxes Using PowerShell 

You can use the following cmdlet to display the list of room mailboxes using PowerShell. 

Get-Mailbox -ResultSize Unlimited -Filter {RecipientTypeDetails -eq "RoomMailbox"} | Select-Object Name, Alias, PrimarySmtpAddress, DisplayName, RecipientTypeDetails, ResourceCapacity 

Display List of Room Mailboxes Using PowerShell


Get Room Mailbox Calendar Settings 

To display the calendar settings for a room mailbox using PowerShell, you can use the following cmdlet.

Get-CalendarProcessing -Identity <Room Mailbox> | Format-List  

The generated output includes information on its settings, such as whether it automatically processes meeting requests, the maximum meeting duration, and who can receive meeting requests on behalf of the room. 


Display Room Mailbox Calendar Permissions Using PowerShell 

You can use the following PowerShell cmdlet to display the calendar permissions for a specific room mailbox. 

Get-MailboxFolderPermission "<Room Mailbox>:\Calendar" 

This cmdlet will display a list of all users who have access to the calendar for the specified room mailbox, along with their level of access. 

Display Room Mailbox Calendar Permission Using PowerShell


Convert User Mailbox to Room Mailbox in Exchange Online

To convert a user mailbox to a room mailbox in Exchange Online, you can use the following PowerShell cmdlet. 

Set-Mailbox <RegularMailboxName> -Type Room 

You can also convert the room mailbox into a user mailbox using the below PowerShell cmdlet. 

Set-Mailbox <RoomMailboxName> -Type Regular 


Room Lists in Exchange Online 

Microsoft Exchange Online uses Room Lists to group related room mailboxes together. It helps users easily locate and select the desired meeting or event room. With Exchange Online PowerShell, you can create room lists and add room mailboxes to them. 


Create Room Lists Using Exchange Online PowerShell 

To create a new room list, execute the following command in the Exchange Online PowerShell. 

New-DistributionGroup -Name <RoomListName> -RoomList 

Create room list in exchange online


Add a Room to a Room List Using PowerShell 

 To add a room mailbox to a room list in Office 365, use the ‘Add-DistributionGroupMember’ cmdlet with the room list name and the room mailbox UPN.

Add-DistributionGroupMember -Identity <RoomListName> -Member <RoomMailboxUPN> 


Convert a Distribution Group to a Room List Using PowerShell

You can convert a distribution group to a room list with the help of the ‘Set-DistributionGroup’ cmdlet. Passing the distribution group name as the parameter to the cmdlet converts the distribution group into a room list. 

Set-DistributionGroup -Identity <DistributionGroupName> -Room List 

Note: Before you run the cmdlet, make sure that the distribution group contains only the room mailboxes that you want to manage as a resource. 


Delete Room Mailbox Using PowerShell 

To delete a room mailbox using PowerShell in Exchange Online, you can use the Remove-Mailbox cmdlet.

Remove-Mailbox -Identity <RoomMailboxName> -Confirm: $false 

Note: This command will delete the room mailbox without prompting for confirmation. 

To bulk delete all the room mailboxes, you can use the following PowerShell cmdlet. 

Get-Mailbox -Filter '(RecipientTypeDetails -eq "RoomMailBox")'| Remove-Mailbox -Confirm: $false 


We hope this quick guide will help you get an overview of the essential PowerShell cmdlets to manage room mailbox using PowerShell in Exchange Online. Feel free to ask your queries in the comments section.

A Quick Guide to Manage Room Mailbox Using PowerShell

by Thiraviam time to read: 6 min