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

Advertisement

4 thoughts on “Setup PowerShell to connect Microsoft Teams Administration

  1. PITM

    After a lot of struggle Connect-MicrosoftTeams worked for me on Windows 2019 Powershell.
    Didn’t work on Windows 10 or Windows 2012R2

  2. nx u

    Same here.. I think there is a need for well thought out answers to curve balls that Teams throws at will. In light of the comments here can you go back and re-do this article to fix whatever Microsoft has put in place that is not working?

  3. Tomasz B

    Connect-MicrosoftTeams : The ‘Connect-MicrosoftTeams’ command was found in the module ‘MicrosoftTeams’, but the module could not be loaded. For more information, run ‘Import-Module MicrosoftTeams’.

  4. husam

    The term ‘Connect-MicrosoftTeams’ is not recognized as the name of a cmdlet, function, script
    file, or operable program.

    still appear after execute Connect-MicrosoftTeams although follow steps !!!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s