Use Azure Cloud Shell To Manage Microsoft Teams PowerShell

The PowerShell module in Microsoft Teams has a lot of benefits. One of them is that it provides a way to work with Powershell commands without using the GUI. It also provides many new cmdlets for doing things on Teams. But this post isn’t about all of the cool things that you can do with PowerShell in Teams.

Azure Cloud Shell is a highly scalable, interactive environment for managing your Azure resources. It provides Kubernetes clusters, Docker environments and an open-source bash shell.

The benefit of using Cloud Shell to manage Teams it that you don’t need to worry about installing, updating, and managing the Teams PowerShell module since the Cloud Shell image gets updated every few weeks.

Cloud Shell is also available from anywhere using the browser and from Windows Terminal.

To use Azure Cloud Shell with Windows Terminal visit the following post.

MS Teams

After login into Cloud Shell, go ahead and run the following command to check the Teams PowerShell version. You will notice that the version number is 2.5.1 which is one version behind the latest Team PowerShell version.

Get-Module microsoftteams -ListAvailable

To start using Teams type this cmdlet. Note that you have to use the -identity switch as there is no interactive prompt in Cloud Shell.

connect-MicrosoftTeams -identity

Once authenticated you can run any Teams cmdlet and manage your tenant.

To view all the available cmdlets for MS Teams run

Get-Command -Module microsoftteams