Thursday 5 August 2021

Microsoft Teams - The term is not recognized as the name of a cmdlet..

If you get an error message like the one below when attempting to issue commands like "connect-microsoftteams" - it's because you haven't got the MS Teams cmdlets installed

Connect-MicrosoftTeams : The term 'Connect-MicrosoftTeams' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

At line:1 char:1

To install the Microsoft Teams Powershell cmdlets, enter the command below. Make sure you run this from an elevated/administrator powershell prompt

install-module -name MicrosoftTeams -force

If you don't run it as administrator, you'll get a message like this;

install-module : Administrator rights are required to install modules in 'C:\Program Files\WindowsPowerShell\Modules'. Log on to the computer with an account that has Administrator rights, and then try again, or install 

'C:\Users\username\Documents\WindowsPowerShell\Modules' by adding "-Scope CurrentUser" to your command. You can also try running the Windows PowerShell session with elevated rights (Run as Administrator).

The installation may take a minute or two to complete, you can confirm the module has been installed by running the following command

import-module "MicrosofTeams"

Then run the command

get-module

A list of available modules will be displayed which should include MicrosoftTeams like the screenshot below

get-module command output showing MicrosoftTeams module available


No comments:

Post a Comment