How to create multiple rooms or desks in Exchange for Microsoft 365

Learn how to massively create rooms or desks for your organization

This guide is suitable for administrators utilizing Windows, MacOS, and Linux operating systems.


When setting up resources such as desks or rooms through the Exchange interface on Microsoft 365, each object needs to be created individually. This process can be time-consuming, especially when multiple objects need to be created. However, with PowerShell it is possible to create multiple resources with a single command, streamlining the creation process.

Requirements

  • Make sure you have installed the latest version of PowerShell for either Windows, MacOS or Linux: click here to go to Microsoft's download page for Powershell
  • A Microsoft 365 Exchange Online subscription
  • In your organization's Microsoft 365 environment, make sure you have the right level of access (Exchange Administrator or higher):

    Admin center Access section in roles in Microsoft 365

Create Multiple Rooms or Desks Simultaneously

To get started, create a spreadsheet with the information you want to make available for the meeting rooms, or desks.

In this example, we will create five meeting rooms, but the procedure for desks is exactly the same. The rooms will be called:

  • Conference Room D
  • Conference Room E
  • Conference Room F
  • Conference Room G
  • Conference Room H

The spreadsheet should have the following columns:

  • Roomname
  • EmailAddress
  • Location
  • Capacity

Each of the columns should be populated according to your organization's requirements. For this example, we will use the "tryaskcody.com" domain, set the location of rooms to Boston, and the corresponding capacity.

The spreadsheet should look like the following:

Screenshot of a spreadsheet with meeting room information

Once you have completed filling out the spreadsheet, make sure to give it a recognizable name and save it in the location of your choice in .CSV format.

Screenshot of a spreadsheet saving options

The next step is to use the file, importing it via PowerShell and automating the room/desk creation process.

First, open PowerShell in administrator mode:

PowerShell in Administrator Mode

Then, run the following command to sign in to your organization's Exchange Online environment:

connect-ExchangeOnline

You should be prompted with a login screen on your browser, to authenticate your credentials. Make sure to be logged in with the right account:

screenshot of login page of Microsoft 365

After authenticating, you should see the following message on your browser:

 

In case you get an error message, make sure that you have installed the Exchange Online Remote Management module within PowerShell by running the following command:

Install-Module -Name ExchangeOnlineManagement

After installing it, try re-running the command above to authenticate your credentials with Microsoft Exchange again.

After authenticating, your PowerShell window should look like the following:

Screenshot of Microsoft Powershell

In here it is important to locate the path (folder location) of the spreadsheet you created above. To locate the path, simply find the file using Windows Explorer, right click it and then click on "Copy as path":

For the example of this guide, this was the path: "C:\Users\DavidBakPosada\Desktop\ConferenceRooms.csv"

Then, type in the following command in the PowerShell window:

Import-csv TYPE_YOUR_FILE_PATH_HERE | foreach{ New-Mailbox -Name $_.roomname -Room -PrimarySmtpAddress $_.emailaddress -ResourceCapacity $_.capacity }

In our case, the command looks like this:

Import-csv "C:\Users\DavidBakPosada\Desktop\ConferenceRooms.csv" | foreach{ New-Mailbox -Name $_.roomname -Room -PrimarySmtpAddress $_.emailaddress -ResourceCapacity $_.capacity }


Run the command
by pressing the Enter key on the keyboard. 

You should see a message like the following:

Screenshot of a PowerShell result message with meeting rooms created in Microsoft Exchange

After this, the meeting rooms should be available in Microsoft Exchange, and for booking as well:

Screenshot of meeting rooms within Microsoft Exchange