Connect-MicrosoftTeams not working

Anonymous
2019-09-21T21:59:22+00:00

Hi Team, Please advice am i doing something wrong

PS C:\WINDOWS\system32> find-Module -Name MicrosoftTeams

Version    Name                                Repository           Description

-------    ----                                ----------           -----------

1.0.2      MicrosoftTeams                      PSGallery            Teams Cmdlets module

Installed module using - install-Module -Name MicrosoftTeams.

Getting error when run     Connect-MicrosoftTeams

PS C:\WINDOWS\system32> Connect-MicrosoftTeams

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

Microsoft Teams | Microsoft Teams for business | Other

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

54 answers

Sort by: Newest
  1. Anonymous
    2021-03-30T20:27:39+00:00

    It worked for me like this:

    1. Install module in Administrator's powershell

    2. Then run powershell as user

    PS C:\Users\t> Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope Process

    Execution Policy Change

    The execution policy helps protect you from scripts that you do not trust. Changing the execution policy might expose

    you to the security risks described in the about_Execution_Policies help topic at

    https:/go.microsoft.com/fwlink/?LinkID=135170. Do you want to change the execution policy?

    [Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "N"): y

    PS C:\Users\t> Import-Module MicrosoftTeams

    PS C:\Users\t> Connect-MicrosoftTeams

    (asks for credentials)

    Account                       Environment Tenant                               TenantId

    -------                       ----------- ------                               --------

    Was this answer helpful?

    10+ people found this answer helpful.
    0 comments No comments
  2. Anonymous
    2021-03-22T15:11:37+00:00

    Confirming need to close and re-open Powershell after installing module to work.

    Was this answer helpful?

    2 people found this answer helpful.
    0 comments No comments
  3. Anonymous
    2020-11-26T13:41:33+00:00

    Hello Ashka123,

    Thanks for your prompt update. According to my experience, you should be able to connect to Microsoft Teams without any problems after installing the module. In order to narrow down the issue and find the root cause, I need to collect the following information:

    1. Whether powershell can find other cmdlets in that module. Run Import-Module -Name MicrosoftTeams. Then type add-team then press tab to see if it will get auto-completed. You can capture a screenshot for further check.
    2. Please check whether PowerShell can run other modules. For example, AAD and Exchange Online. Here is the command to connect to ADD: Connect-MsolService     
    3. Please run the following command to get the store info: $env:PSmodulepath -split ";"
    4. Run the following to gather stream info when processing the command: Connect-MicrosoftTeams -verbose and Connect-MsolService -verbose

    Please capture a screenshot of each output and upload them in the forum for further analyzing. Thanks for your patience and cooperation.

    Regards,

    Rick

    This worked for me after a restart

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2020-10-26T07:38:36+00:00

    depending on what you need, I would advise you to connect to MS first, and start a powershell session from there :

    I hardly use the 'local' cmdlets anymore


    #connect to office365 without MFA

    $Office365Admin = Get-Credential ******@heliconnl.onmicrosoft.com #use youre officeadmin account

    $SESSION = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri "https://outlook.office365.com/powershell-liveid/" -Credential $O365CREDS -Authentication "Basic" -AllowRedirection

    Import-PSSession $SESSION

    Connect-MicrosoftTeams -Credential $Office365Admin

    regards Tom

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  5. Anonymous
    2020-10-24T19:38:14+00:00

    It's ridiculous. Non of MS solutions work. It is jus impossible to run MicrosoftTeams module on some machines with Windows 10. I have 3. Works fine only on one of them.

    No support, no solution, no possibility to "refresh"/"reinstall" powershell, purge modules etc. because it is "integral part of the system". 

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments