How to use Set-Place in Powershell
Managing resource locations, such as meeting rooms and equipment, can be daunting, especially when ensuring all properties are accurately updated and maintained.
Incorrect or outdated information can lead to booking issues and cause confusion among users. This is where the Set-Place cmdlet is helpful.
What Is the Set-Place Command in PowerShell?
The Set-Place cmdlet in PowerShell is a cmdlet used to manage and update information about resource mailboxes, specifically places, in Exchange Online and Exchange Server 2016 or later.
This cmdlet allows administrators to configure properties of place mailboxes, which represent physical locations such as meeting rooms or conference rooms.
Using Set-Place, you can update attributes such as room capacity, floor, building, features, and other metadata that help users find and book these resources efficiently through Outlook or other calendar applications.
Here’s the syntax of Set-Place in PowerShell, along with the meaning of each parameter:
Set-Place [-Identity] <RecipientIdParameter> [-AudioDeviceName <String>] [-Building <String>] [-Capacity <System.Int32>] [-City <String>] [-Confirm] [-CountryOrRegion <CountryInfo>] [-Desks <RecipientIdParameter[]>] [-DisplayDeviceName <String>] [-Floor <System.Int32>] [-FloorLabel <String>] [-GeoCoordinates <GeoCoordinates>] [-IsWheelChairAccessible <Boolean>] [-Label <String>] [-MTREnabled <Boolean>] [-ParentId <String>] [-ParentType <Microsoft.Exchange.Management.RecipientTasks.SetPlaceParentType>] [-Phone <String>] [-PostalCode <String>] [-State <String>] [-Street <String>] [-Tags <String[]>] [-VideoDeviceName <String>] [-WhatIf] [<CommonParameters>] |
- -Identity <RecipientIdParameter>: Specifies the room mailbox to be updated.
- -AudioDeviceName <String>: Sets the name of the audio device available in the room.
- -Building <String>: Specifies the building where the room is located.
- -Capacity <System.Int32>: Defines the maximum number of people the room can accommodate.
- -City <String>: Sets the city where the room is located.
- -Confirm: Prompts for confirmation before executing the cmdlet.
- -CountryOrRegion <CountryInfo>: Specifies the country or region of the room's location.
- -Desks <RecipientIdParameter>: Lists the desks associated with the room.
- -DisplayDeviceName <String>: Sets the name of the display device available in the room.
- -Floor <System.Int32>: Indicates the floor number where the room is located.
- -FloorLabel <String>: Provides a label for the floor where the room is located.
- -GeoCoordinates <GeoCoordinates>: Sets the geographical coordinates of the room.
- -IsWheelChairAccessible <Boolean>: Indicates if the room is wheelchair accessible.
- -Label <String>: Provides a label or name for the room.
- -MTREnabled <Boolean>: Specifies if the room supports Microsoft Teams Rooms (MTR).
- -ParentId <String>: Identifies the parent location or entity of the room.
- -ParentType <Microsoft.Exchange.Management.RecipientTasks.SetPlaceParentType>: Specifies the type of the parent entity.
- -Phone <String>: Sets the phone number associated with the room.
- -PostalCode <String>: Defines the postal code of the room's location.
- -State <String>: Sets the state or province where the room is located.
- -Street <String>: Specifies the street address of the room.
- -Tags <String>: Lists tags associated with the room for easier identification.
What Does Set-Place in Powershell Do?
Set-Place is used to modify properties of resource locations, such as rooms or equipment, within an organization's directory. These resources often have attributes such as capacity, location, audio-visual equipment availability, and more.
Using Set-Place, administrators can update these properties to ensure accurate information is available to users when they book resources.
Here are three use cases for the Set-Place cmdlet in PowerShell:
- Updating Room Capacity: Use Set-Place to update the capacity of a meeting room to reflect changes in seating arrangements. For example, if a room's capacity is reduced from 20 to 10, this can be updated so users see the correct capacity when booking.
- Adding Room Features: It's possible to use Set-Place to specify features available in a meeting room, such as AV equipment, whiteboards, or video conferencing capabilities. This helps users select rooms that meet their specific needs when scheduling meetings.
- Organizing by Location: You can also use Set-Place to update the location details of a meeting room, such as building name, floor number, or specific area within a building. This makes it easier for users to find and book rooms that are conveniently located.
Prerequisites to Use the Set-Place PowerShell Command
There are three main prerequisites for successfully running the Set-Place cmdlet in PowerShell:
- Permissions: You need to be assigned the necessary permissions before you can run this cmdlet. This includes permissions like Recipient Management or Organization Management role group membership in Exchange Online or Exchange Server.
- Exchange Online PowerShell Module (EXO V3): According to Microsoft, it's recommended to use the EXO V3 module to run this cmdlet, as older versions may have issues with certain property combinations. The EXO V3 module provides improved compatibility and functionality.
- Hybrid Environment Considerations: In hybrid environments, certain properties on synchronized room mailboxes cannot be modified directly using the Set-Place cmdlet. These properties include City, CountryOrRegion, GeoCoordinates, Phone, PostalCode, State, or Street. For these properties, use the Set-User or Set-Mailbox cmdletsin on-premises Exchange.
How to Use Set-Place in PowerShell in 3 Steps
Using the Set-Place command is straightforward if you follow these three quick steps.
Step 1: Prepare Permissions and Environment
Before using the Set-Place cmdlet, you need to make sure that you have the necessary permissions and your environment is properly set up.
First, ensure you have the correct permissions to manage place mailboxes. As mentioned before, this involves being a member of the Recipient Management or Organization Management role groups in Exchange Online or Exchange Server.
To check your current role group memberships, you can use PowerShell commands such as Get-RoleGroupMember or Get-ManagementRoleAssignment.
Then, you need to install the Exchange Online PowerShell Module (EXO V3) by using the following command:
Install-Module -Name ExchangeOnlineManagement -Force -AllowClobber |
After installing the module, connect to your Exchange Online environment using the Connect-ExchangeOnline cmdlet as follows, and then proceed to the next step:
Connect-ExchangeOnline -UserPrincipalName <yourUPN> -ShowProgress $true |
Step 2: Identify the Place Mailbox to Update
Once your environment is set up and you have the necessary permissions, it’s now time to identify the place mailbox that you want to update.
To find the mailbox identity, use the Get-Place cmdlet, which will retrieve information about existing place mailboxes. You can filter results by specifying the mailbox identity or other attributes. Take a look at the following example:
Get-Place -Identity "Meeting Room 1" |
This command displays all available properties of the place mailbox "Meeting Room 1,” which will give you all the info you need to proceed.
Step 3: Update the Place Mailbox Using Set-Place in PowerShell
After identifying the place mailbox and reviewing its current properties, proceed to update the desired attributes using the Set-Place cmdlet.
For example, let’s use the Set-Place cmdlet to update specific properties of the place mailbox with this code:
Set-Place -Identity "Meeting Room 1" -Capacity 20 -Floor 3 |
After updating, you can verify that the changes were applied correctly using the following command:
Get-Place -Identity "Meeting Room 1" | Select-Object -Property Capacity, Floor |
In this case, this command verifies that the capacity and floor properties of "Meeting Room 1" have been updated.
Following these steps ensures that you successfully use the Set-Place cmdlet to manage and update place mailboxes in your Exchange environment.
Optimize Your Workspace with PowerShell's Set-Place Cmdlet
The Set-Place cmdlet in PowerShell is a powerful tool for administrators to manage and update place mailboxes in Exchange environments effectively.
Whether adjusting room sizes, updating features, or refining location details, Set-Place provides the tools you need to improve workspace use and boost user productivity.