Setup PowerShell to connect Microsoft Teams Administration

Error “Connect-MicrosoftTeams : The term ‘Connect-MicrosoftTeams’ is not recognized as the name of a cmdlet

Root cause – Obviously because of the PowerShell module availability in the machine you are trying to connect from. Every module needs its presence in the local machine to be able to work with PowerShell properly so, installing it and keeping it up to date is vital for commands to execute against the target workload (like Teams, SharePoint or Exchange etc..)

Let’s get through the basics of installing Microsoft Teams PowerShell module. Ensure you launch the native PowerShell from your machine, not Exchange Online PowerShell or SharePoint ones.

Type PowerShell in the start menu and –> right click on the native PowerShell tool and run as Admin

PowerShell

Type this in PowerShell and Enter

Find-Module -Name MicrosoftTeams

clip_image001

Now let’s install this. Type this in PowerShell and Enter

Find-Module -Name MicrosoftTeams | Install-Module

clip_image002

Type “Y” to continue

clip_image003

Now let’s run the connect command to interact with the Office 365 tenant

Connect-MicrosoftTeams

clip_image004

And this should prompt you for authentication where you will provide the Admin credentials to connect

image

Once done, you will get connected to the tenant as below

image

Now, let’s just verify the functionality by running a simple Teams command. If this succeeds, you have installed PowerShell module for Microsoft Teams properly!

Get-Team

image