HOW TO CREATE A MICROSOFT TEAMS ROOM RESOURCE WITH POWERSHELL

HOW TO CREATE A MICROSOFT TEAMS ROOM RESOURCE WITH POWERSHELL

Note: Always run Powershell with administrator privileges.

Prerequisites:


  • Up-to-date Powershell application

  • Exchange Online Management module for Powershell (EXO V2)

  • Microsoft Teams Room License (Pro ***Standard and Premium licenses are now Legacy***)


Updating Powershell

Install-Module PowershellGet -Force
Update-Module PowershellGet
Set-ExecutionPolicy RemoteSigned
Install-Module -Name ExchangeOnlineManagement 



Installing EXO V2


Import-Module ExchangeOnlineManagement; Get-Module ExchangeOnlineManagement 




Connecting to Exchange Online

Connect-ExchangeOnline
Connect-MsolService
Install-Module MicrosoftTeams
Connect-MicrosoftTeams
Get-MsolAccountSKU


Connect-exchangeonline
                  // You will be required to enter you credentials. Make sure you use an account that has user admin privileges //
Connect-msolservice                        //  You will be required to enter you credentials. Make sure you use an account that has licensing admin privileges  //

Install-module microsoftteams    // If you haven't install this module. It's only required if it's the first time you connecting to it//

Connect-microsoftteams             // You will be required to enter you credentials. Make sure you use an account that has Teams administrator privileges//

Get-MsolAccountSku                  // This command will return available licenses SKU available under your account //




Setting variables:

$NewRoom="[EmailAddress]"
$Name="[DisplayName]"
$pwd="[YourPassword]"
$location="CA"
$license="[LicenseName]"

Replace text in [...] by the actual information of your room. To obtain the exact name of the license, run the Get-MsolAccountSku command

Creating the resource mailbox:


New-Mailbox -MicrosoftOnlineServicesID $newRoom -Name $name -Room -RoomMailboxPassword (ConvertTo-SecureString -String $pwd -AsPlainText -Force) -EnableRoomMailboxAccount $true 
Set-Mailbox -Identity $newRoom -MailTip “This room is equipped to support Teams Meetings”
Set-CalendarProcessing -Identity $newRoom -AutomateProcessing AutoAccept -AddOrganizerToSubject $false -RemovePrivateProperty $false -DeleteComments $false -DeleteSubject $false -AddAdditionalResponse $true -AdditionalResponse “Your meeting is now scheduled and if it was enabled as a Teams Meeting will provide a seamless click-to-join experience from the conference room.”

//Wait 30 seconds and run the Set-MsolUser cmdlet to disable password expiration and set the UsageLocation :  
Set-MsolUser -UserPrincipalName $newRoom -PasswordNeverExpires $true -UsageLocation $location
Set-MsolUserLicense -UserPrincipalName $newRoom -AddLicenses $license



Get-CsOnlineUser |ft RegistrarPool                             // View the registration pool of your devices //
Get-ExoMailbox -identity ressource@domain.ca   // Validate your resource/mailbox*//

You can also verify the calendar processing for your newly created resource mailbox using the following command:

Get-CalendarProcessing -Identity [mailboxEmail] | Format-List



...You're done!