First, start a tenant administrator remote PowerShell session as follows:
PS C:\Windows\system32> Set-ExecutionPolicy Unrestricted
PS C:\Windows\system32> $org='contoso.onmicrosoft.com'
PS C:\Windows\system32> $cred=Get-Credential admin@$org
PS C:\Windows\system32> $sess=New-PSSession –ConfigurationName microsoft.exchange -Credential $cred -AllowRedirection -Authentication basic -ConnectionUri https://ps.outlook.com/powershell
PS C:\Windows\system32> Import-PSSession $sess
These cmdlets create a new PowerShell session for your Office 365 Exchange Online deployment, and then import that session to allow you to run Exchange cmdlets against Exchange Online.
To set an existing resource room mailbox account for LRS, run the following cmdlet:
PS C:\Windows\system32> $rm="confrm1@$org"
PS C:\Windows\system32> $newpass='pass@word1'
PS C:\Windows\system32> Set-Mailbox -MicrosoftOnlineServicesID $rm -room -Name "Conf Room 1" -RoomMailboxPassword (ConvertTo-SecureString $newpass -AsPlainText -Force) -EnableRoomMailboxAccount $true
To create a new Exchange resource mailbox account for LRS, run the following cmdlet:
PS C:\Windows\system32> $rm="confrm2@$org"
PS C:\Windows\system32> $newpass='pass@word1'
PS C:\Windows\system32> New-Mailbox -MicrosoftOnlineServicesID $rm -room -Name "Conf Room 2" -RoomMailboxPassword (ConvertTo-SecureString newpass -AsPlainText -Force) -EnableRoomMailboxAccount $true
The previous cmdlet sets up or creates a new Exchange resource mailbox account for LRS usage by enabling the account. The following properties must be set on the new resource mailbox account to ensure that the LRS console functions properly:
PS C:\Windows\system32> Set-CalendarProcessing -Identity confrm1 -AutomateProcessing AutoAccept
PS C:\Windows\system32> Set-CalendarProcessing -Identity confrm1 -DeleteSubject $false