Learning Hub / Tutorials / MSTeams / Log in with PowerShellFAQs

Tutorials: Log in with PowerShell

Log in with PowerShell

Disclaimer: Run PowerShell at your own risk; the information below is to help. Please do your own research and check any errors you may receive.

Search for PowerShell and select "Run as Administrator"

Enter this command to get the MicrosoftTeams module from an online repository:

Install-Module -Name MicrosoftTeams
  • Accept the repository changes if required.
  • If your screen show this, enter [Y] to accept the repository changes.

Enter this command to retrieve PowerShell modules installed on your computer:

Get-InstalledModule

Enter this command to set the execution policy to require all scripts and configuration files downloaded from the Internet are signed by a trusted publisher:

Set-ExecutionPolicy RemoteSigned

Enter "a" for "Yes to All"

Enter this command to add the MicrosoftTeams module to the current session:

Import-Module MicrosoftTeams

Enter this command to authenticate your account for use with cmdlets from the MicrosoftTeams module:

Connect-MicrosoftTeams

Enter your username.

Enter your password.

Download the Microsoft Authenticator app for your iOS or Android device and use it to sign in.

You are now logged in to Teams via PowerShell. You can now run "Get" cmdlets for setting up your PSTN and your routes.

Learning Hub / Tutorials / MSTeams / Log in with PowerShellFAQs