Use Native Microsoft Teams PowerShell module instead of legacy Skype for Business Online Connector

Balu Ilag | March 23rd 2021

Use Native Microsoft Teams PowerShell module instead of legacy Skype for Business Online Connector

Use Native Microsoft Teams PowerShell module instead of legacy Skype for Business Online Connector

Microsoft is moving away from Skype for Business online PowerShell module to native Microsoft Teams with less command to execute. Basically, Microsoft has simplified the administrator experience by having Connect-MicrosoftTeams as the single PowerShell command to log in and manage all aspects of Teams and Skype for Business Online. This means the New-CsOnlineSession command is no longer required to log in and manage Skype for Business Online and Teams tenant workload.

Another advantage of moving to the new Microsoft Teams PowerShell module is allowing long-running scripts natively supported in the module. So that the administrators don’t have to explicitly call Enable-CsOnlineSessionForReconnection to run long-running scripts.

This article will walk you through seamlessly move to Teams native PowerShell model from legacy Skype for Business Online module.

Prerequisite: You must have PowerShell 5.1 or later installed on your machine.

How to check the PowerShell version?

Simply open PowerShell and type, $PSVersionTable

How to Install Microsoft Teams’ new PowerShell Module?

Open PowerShell Gallery that shows the new Teams PowerShell details.

https://www.powershellgallery.com/packages/MicrosoftTeams/2.0.0

Open PowerShell as Administrator and then type the below command to install the Teams PowerShell.

Install-Module -Name MicrosoftTeams

Select Yes to all.

Note: If you have an older Teams module installed then use -Force to install a new module side by side. Refer to below command with -force parameter.

Install-Module -Name MicrosoftTeams -Force

After the new module installation, just run the below command to connect Teams PowerShell.

#Connect Teams PowerShell

   Import-Module MicrosoftTeams

   $credential = Get-Credential

   Connect-MicrosoftTeams -Credential $credential

Remember you can only use the Connect-MicrosoftTeams command when using Teams PowerShell Module 2.0 or later

After connects, you will see the tenant ID, as shown in the below figure.

After connects, you run a command to test it returns proper results.

Enjoy the new Microsoft Teams native module instead of Skype for Business Online module.

Reference:

Thank you.

No Comments

Sorry, the comment form is closed at this time.