PowerShell Reference Commands

Most of the configuration for room distribution lists and managing room resources require some knowledge and use of PowerShell commands.

The following command references are for Exchange Server 2013 using Exchange Online.  Commands and access might be different for on-premise Exchange and other Exchange versions.  Contact your IT administrator for help.

You must download and install PowerShell and the Online Services Module to perform these commands.  All commands shown are on a separate line in the PowerShell command line interface.

PowerShell 4.0 Download:

      http://www.microsoft.com/en-us/download/details.aspx?id=40855

The Microsoft Online Services Module for Windows PowerShell for Office365 is available here:

      (64-bit) http://office.microsoft.com/en-US/XT104029214.aspx

      (32-bit) http://office.microsoft.com/en-US/XT104029215.aspx

Exchange Online References:

      Create a Room List Distribution Group

      Create and Manage Room Mailboxes

PS commands to login to Office365:

Perform this set of commands to create a session with Exchange.  A login prompt at the “Get-Credential” command will show up, and an administrator can login.

>Set-ExecutionPolicy RemoteSigned

>$LiveCred = Get-Credential (use admin account for login)

>$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $LiveCred -Authentication Basic –AllowRedirection

>Import-PSSession $Session

Here’s the commands in the PowerShell window:

After you’ve logged in and created a session, you can enter other mailbox commands below to manage your exchange settings.

PS commands for managing mailboxes:

>Get-Mailbox -ResultSize unlimited -Filter {(RecipientTypeDetails -eq 'RoomMailbox')} (list all room mailboxes)

>new-distributiongroup -name "Building 2 Rooms" -roomlist (create a new roomlist distribution list)

>Set-DistributionGroup -Identity "Building 34 Conference Rooms" -RoomList (convert a dist list to a room list)

PS Commands for adding rooms to a room list

>Add-DistributionGroupMember -Identity "Building 1 Rooms" -Member room102@yourdomain.com

PS Commands for room resource properties

By default, each new room mailbox will assign the subject of a meeting to the name of the user that is organizing the meeting.  You will need to make the adjustment using the command below to allow the meeting subject from the organizer to be set to the subject in the room calendar.

>Get-CalendarProcessing -Identity <RESOURCEMAILBOX> | FL (displays all resource mailbox properties)

>Set-CalendarProcessing -identity <RESOURCEMAILBOX> -AddOrganizerToSubject $false -DeleteAttachments $true -DeleteSubject $false (This will allow organizer's subject to be the event name)

PS Commands to assign permissions to room mailbox

>add-mailboxpermission -identity:room102 -user:joeuser@yourdomain.com
-Accessrights: fullaccess -inheritance:all

PS Command to create a room resource mailbox

>New-Mailbox -Database "Mailbox Database 1" -Name ConfRoom1
-DisplayName "Conference Room 1" -Room