Creating Microsoft Teams Rooms Account Using PowerShell
Microsoft Teams Video Conference Room

Creating Microsoft Teams Rooms Account Using PowerShell

Microsoft Teams Rooms is a video conferencing device that sits in a conference room so that everybody can join a meeting with one touch. In this example, I’m using Logitech TAP Microsoft Teams Rooms with Office365 Resource Account and Microsoft Teams Rooms Standard License. 

 Prerequisites:

·       Office365 Global Admin Access

·       Microsoft Teams Rooms Standard License/Premium License

o  Acquire Trial license if not available

·       Microsoft Teams Rooms Devices (I recommend Logitech TAP/Rally)

·       PowerShell Administrator Access

 There are small green comments in the script that summarizes what each line does, but I’ve also elaborated more on each line down below for a deeper understanding.

If you plan to use this script, I highly recommend that you run 1 line of code at a time from top to bottom for no additional complications.

No alt text provided for this image

Line 4 – 6:

install-module AzureAD

install-module AzureADPreview

install-module MSOnline

These cmdlets are to install the multiple modules related to Azure Active Directory. This allows for the PowerShell to access the Azure AD Resources and receive the connection.

Line 8:

Import-Module MSOnline

This imports the MSOnline module, which allows for user licenses and permissions to be easily accessed

Line 10: $Credentials = Get-Credential

$Credentials is a variable that I created to store the cmdlet Get-Credential, which asks for administrator credentials. I created this variable for the sake of ease while scripting and readability (throughout this script it asks for credentials, so this makes it easier).

Line 12: Connect-MsolService -Credential $Credentials

This connects the PowerShell to the MsolService (Azure Active Directory), which in turn requires your credentials.

Line 16: Connect-ExchangeOnline -Credential $Credentials -ShowProgress $true

This connects to Exchange Online while requiring credentials in return. Connecting to Exchange Online gives access to everything Exchange related, examples being mailboxes and email services (which I will touch on more later). Note that this is the most important cmdlet in the script, so if this happens to return an error, the rest of the script will NOT function.

Line 19: $TeamsVariable = "[email protected]"

I created this variable named TeamsVariable which holds a String of the user we will create. This helps the readability of the script and to make changes efficiently. In this example, my user is [email protected]

Line 22:

New-Mailbox -MicrosoftOnlineServicesID $TeamsVariable -Alias "cfsirius" -Name "Conf Room Sirius" -Room -EnableRoomMailboxAccount $true -RoomMailboxPassword (ConvertTo-SecureString -String 'Apple11!!' -AsPlainText -Force)

 This line creates a New Mailbox using our TeamsVariable (user), setting Alias (cfsirius), the name of the user (Conf Room Sirius), clarifies that this mailbox is a RoomMailboxAccount for Microsoft Teams Rooms, and set the password (in this case I made the password to be Apple11!!).

Line 25:

Set-CalendarProcessing -Identity $TeamsVariable -AutomateProcessing AutoAccept -AddOrganizerToSubject $false -AllowConflicts $false -DeleteComments $false -DeleteSubject $false -RemovePrivateProperty $false

 This line goes into the Calendar Processing setting, which has many different arguments that this cmdlet can hold. In this example, I only chose to manipulate AutomateProcessing, AddOrganizerToSubject, AllowConflicts, DeleteComments, DeleteSubject, and RemovePrivateProperty.

The most important part of this cmdlet is the -AutomateProcessing AutoAccept which enables AutoAccept. AutoAccept is a setting that, if enabled, allows a teams room to automatically accept any request to join a meeting. This helps the effectiveness of booking a room in an organization without hassle or conflict with scheduling. For example, if anyone tries to join a room that is booked due to AutoAccept, it will decline the invite.

Line 28:

Set-CalendarProcessing -Identity $TeamsVariable -AddAdditionalResponse $true -AdditionalResponse "This is a Teams Room using Logitech TAP and Rally. Join this meeting using Microsoft Teams!"

 This line continues in the Calendar Processing setting, in which it allows for the Additional Response setting. Additional Response gives extra information to the user who is inviting the room to a meeting. In this example, I put “This is a Teams Room using Logitech TAP and Rally. Join this meeting using Microsoft Teams!” So whenever a user books the room successfully, this message is displayed to give instructions or information of the room (typically).

Line 31: Set-MsolUser -UserPrincipalName $TeamsVariable -PasswordNeverExpires $true

This reassures the user that we created never lets their assigned password to expire.

Line 34:

$AddTeamsLicense = Get-MsolAccountSku | where {$_.AccountSkuId -like $("*:MEETING_ROOM")}

 I created this variable (AddTeamsLicense) to access the Meeting Room License.

Line 37: $AddTeamsLicense

This line is just to run the variable created above. It double checks that it has access to the Meeting Room license, gives information about how many licenses are used and available for use.

Line 40:

Set-MsolUser -UserPrincipalName $TeamsVariable -UsageLocation (Get-MsolCompanyInformation).CountryLetterCode

 This line accesses the country code, and makes sure that the country that we are in allows for the accessibility of the licenses. It finds the country code by getting it through the CompanyInformation and sets it to the user.

Line 43:

Set-MsolUserLicense -UserPrincipalName $TeamsVariable -AddLicenses $AddTeamsLicense.AccountSkuId

 The final line of our script adds the license (Meeting Room Standard) to our user account.

Wait for 2 to 4 hours for account to be completely ready in Office365. Next step is to use this resource account and login to Microsoft Teams Room. To test, send a Teams meeting invite to this resource account and join with one touch using Logitech TAP.

If you have any questions, please feel free to contact me via email: [email protected]

Here is my step by step video you can follow along:



Indra Gharti

Technical Support Specialist, IT Installer, Bsc. Computer Networks & Cybersecurity, AAS in Cybersecurity, BA, CompTIA A+, Network+, Security+ Certified

1 年

Great Job Sankar Sir.

回复
Chauncey Larsen

Surface Technical and AI Storytelling | Commercial Global GTM | Community Engagement

3 年

Solid blog and walkthrough Sanskar! Very helpful!

Samir Thapa (MSIM)

Principal Technology Specialist @Microsoft

3 年

Great job Sanskar

要查看或添加评论,请登录

其他会员也浏览了