Forum Discussion

peter-wxin's avatar
peter-wxin
Copper Contributor
May 08, 2020
Solved

MicrosoftTeams PowerShell cmdlet doesn't work

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!

  • Finally, this post works for me.
    https://infra.engineer/windows/63-powershell-error-message-warning-unable-to-resolve-package-source

9 Replies

  • 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

     

     

  • peter-wxin's avatar
    peter-wxin
    Copper Contributor
    Finally, this post works for me.
    https://infra.engineer/windows/63-powershell-error-message-warning-unable-to-resolve-package-source
  • Hi Peter,

    What is the version of PowerShell?
    Can you validate that you are using PowerShell 5.1 or later?
    • peter-wxin's avatar
      peter-wxin
      Copper Contributor

      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.

Resources