Connecting to Teams PowerShell environment

Last modified: April 12, 2021
You are here:
Estimated reading time: < 1 min

Many administration tasks for Teams require the use of PowerShell.  To connect to the Teams environment via PowerShell, do the following:

    1. Launch an elevated (administrator) PowerShell console by clicking Start, typing PowerShell, right-click and select Run As Administrator

    2. If this is the first time you’re doing this, you must install the Teams module:
      Install-Module MicrosoftTeams
    3. Sign in using modern authentication (must have MFA)
      Replace <UPN> with a username@domain with administrator access

      #Connect to Microsoft Teams 
      Connect-MicrosoftTeams -AccountId <UPN> 
      
      #Connection to Skype for Business Online and import into Ps session 
      $session = New-CsOnlineSession 
      Import-PsSession $session

       

Tags:
Was this article helpful?
Dislike 0
Previous: Caller ID Management (over-stamping)
Next: Creating Automated Attendants or Queues