SOLVED

MicrosoftTeams PowerShell cmdlet doesn't work

Copper Contributor

Excuse me,

Microsoft Teams PowerShell cmdlet doesn't work. The error is:

 

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
+ Connect-MicrosoftTeams + ~~~~~~~~~~~~~~~~~~~~~~
  + CategoryInfo : ObjectNotFound: (Connect-MicrosoftTeams:String) [], CommandNotFoundException
  + FullyQualifiedErrorId : CommandNotFoundException

 

I've installed the module and import it properly. Any idea? Thanks!

PowerShell-MS_Teams-2020-05-09_024131.png

9 Replies
Hi Peter,

What is the version of PowerShell?
Can you validate that you are using PowerShell 5.1 or later?

Hi, @Mitchell Bakker,

Thank you! I also contacted Office365 support and the agent show me the correct and updated command lines to run:

 

PS C:\WINDOWS\system32> $credentials=Get-Credential

cmdlet Get-Credential at command pipeline position 1
Supply values for the following parameters:
Credential
PS C:\WINDOWS\system32> Connect-MicrosoftTeams -Credential $credentials

 

Shame that Microsoft Teams PowerShell cmdlet documentation was not updated or friendly to a 1st-time/new user like me.

So, your problem is fixed now?

Hi @Mitchell Bakker unfortunatley peter-wxin solution didnt worked for me. My Powershell version is 5.1.19041.1
After providing credentials and running the cmd "Connect-MicrosoftTeams -Credential $credentials" it's still throwing the same error.

Microsoft Teams cmdlets module version installed is 1.1.4

Please help

Kind Regards

Alan

Now it's even worse. I cannot install the module in my office... And I tried this post, still no good.

peter-wxin_0-1610018040287.png

 

@AlanWa 

best response confirmed by peter-wxin (Copper Contributor)
this actually worked for me

some of Function in the module could work(csonlineuser,etc.), some are not(broadcastmeetingpolicy,etc.)

any idea ?

Get-CsBroadcastMeetingPolicy : The term 'Get-CsBroadcastMeetingPolicy' 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
+ Get-CsBroadcastMeetingPolicy
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Get-CsBroadcastMeetingPolicy:String) [Get-CsBroadcastMeetingPolicy], Co
mmandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

 

sizhijuejiao_0-1639793372157.png

 

1 best response

Accepted Solutions
best response confirmed by peter-wxin (Copper Contributor)