- Run PowerShell as administrator.

2. Install the PowerShell module for Microsoft Teams in your machine by runnng this command:
Install-Module MicrosoftTeams

Note: To check if you have the Teams module installed already by:
1 | Get-module *teams* |

3. Now, you can connect to Teams and work on your requirements. Get a List of Microsoft Teams with PowerShell using this command:
Connect-MicrosoftTeams

