Note
Skype for Business Online Connector is currently part of the latest Teams PowerShell module. If you're using the latest Teams PowerShell public release, you don't need to install the Skype for Business Online Connector.
This article explains how to install the Microsoft Teams PowerShell module using PowerShellGet. These instructions work on Azure Cloud Shell, Linux, macOS, and Windows platforms.
Warning
There are known issues with PowerShell 7 and Teams PowerShell. For the best experience, we recommend that you use PowerShell 5.1.
Warning
In order to use the latest Teams Powershell, you will need to remove prior installation by going into Add/Remove Programs in Control Panel. The uninstall command does not work in Powershell.
Install the Teams PowerShell module
Use the PowerShellGet cmdlets to install the Teams PowerShell module. Installing the module for all users on a system requires elevated privileges. Start the PowerShell session using Run as administrator in Windows or use the sudo
command on macOS or Linux:
Install-Module MicrosoftTeams
By default, the PowerShell Gallery (PSGallery) isn't configured as a trusted repository for PowerShellGet. The first time you use the PSGallery, you'll see the following message:
Untrusted repository
You are installing the modules from an untrusted repository. If you trust this repository, change
its InstallationPolicy value by running the `Set-PSRepository` cmdlet.
Are you sure you want to install the modules from 'PSGallery'?
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "N"):
Answer Yes or Yes to All to continue with the installation.
Install Teams PowerShell public preview
Note
If you're using the Public Preview version of Teams PowerShell, we strongly recommend that you first uninstall Skype for Business Online Connector.
Installing the Teams PowerShell public preview module for all users on a system requires elevated privileges. Start the PowerShell session using Run as administrator in Windows or use the sudo
command on macOS or Linux.
If you're using PowerShell 5.1, you must update the PowerShellGet module beforehand. After you update PowerShellGet, close and reopen an elevated PowerShell session to ensure that the latest PowerShellGet is loaded.
Install-Module PowerShellGet -Force -AllowClobber
To install Teams PowerShell, run the PowerShell command below.
Note
You can find the latest preview version at PowerShell Gallery or in PowerShell by running "Find-Module MicrosoftTeams -AllowPrerelease"
Install-Module -Name MicrosoftTeams -RequiredVersion 1.1.6
Sign in
Note
If you're using the latest Teams PowerShell public preview release, you don't need to install the Skype for Business Online Connector.
Import-Module MicrosoftTeams
$sfbSession = New-CsOnlineSession
Import-PSSession $sfbSession
Note: Sfb cmdlets will not be available until sfb session is not imported.
*Instructions for Skype for Business Online Connector Installation and subsequent sign in via powershell is covered in Microsoft's article below. However, as stated earlier, if you are running the latest public release Teams Powershell, SfB online connector is not required.
Microsoft Documentation: https://docs.microsoft.com/en-us/microsoftteams/teams-powershell-install
Comments
0 comments
Article is closed for comments.