How to connect with Microsoft Teams using PowerShell

Your download is in progress and it will be complete in just a few seconds! If you face any issues, download manually here

Thank you for registering with ManageEngine.

We will send the download link to the registered email ID shortly.

Manage and Secure Microsoft 365 with M365 Manager Plus

  •  
  •  
  •  
  • By clicking 'Download 30-day free trial' you agree to processing of personal data according to the Privacy Policy.

The Connect-MicrosoftTeams cmdlet connects an authenticated user account to access the Microsoft Teams environment.

Note: You must install the necessary modules (containing the PowerShell cmdlets to manage teams, chats, and channels) before using the Connect-MicrosoftTeams cmdlet. Run the Install-Module MicrosoftTeams cmdlet in PowerShell to install the modules from PSGallery. Once the modules are installed, you can connect to the Microsoft Team environment as shown below.

 

Connect-MicrosoftTeams [-TenantId <String>] [-Credential <PSCredential>] [-AccountId <String>] [-LogLevel <LogLevel>] [-LogFilePath <String>] [-TeamsEnvironmentName <String>] [-WhatIf] [-Confirm] [<CommonParameters>]

Eg. PS C:\> Connect-MicrosoftTeams -TeamsEnvironmentName Marketing

This cmdlet helps you connect to the Marketing teams environment.

The Disconnect-MicrosoftTeams cmdlet disconnects your account and access from Microsoft Teams temporarily.

Disconnect-MicrosoftTeams [-WhatIf] [-Confirm] [<CommonParameters>]

Eg. PS C:\> Disconnect-MicrosoftTeams

This cmdlet disconnects the authenticated account from the Microsoft Teams environment.

Though PowerShell scripts generally help get the work done, they can be complex, time-consuming and error-prone. Looking for small errors like a misplaced colon or hyphen can be a challenge. M365 Manager Plus helps to simplify Microsoft Teams tasks by providing insightful reports and handy management options.

How can M365 Manager Plus help?

The user-friendly interface of M365 Manager Plus offers easy and efficient ways to monitor and audit user activities in Microsoft Teams. Once you connect to the Microsoft Teams environment using the Connect-MicrosoftTeams cmdlet, you can use M365 Manager Plus to keep track of all the sign-ins; monitor team creation, deletion, and daily usage; update activities; and much more.

Steps to fetch reports on Microsoft Teams

  • Choose the Management & Reporting section.
  • Click the Reports tab.
  • Navigate to Other Services → Teams Reports.
  • Choose a report from the list of available reports.
  • Select a suitable Microsoft 365 Tenant from the drop-down.
  • Enter other inputs if prompted, and click Generate Now.
General All Team Report

Click here to learn more about how M365 Manager Plus simplifies complex PowerShell tasks.

Why businesses choose M365 Manager Plus?

What our customers say

  • We can now effectively reconcile which licenses we are using in the organization and assign the cost to the business unit. We were also able to identify a number of license changes that could be put in place that reduced our total Microsoft 365 spending.

    Timothy Ransom
    Group IT/IS manager at The Eclipse Group, United Arab Emirates

  • M365 Manager Plus is valuable to our future business and, most importantly, it allows me to keep improving the level of service we provide.

    IT infrastructure manager
    Sunstar Suisse S.A.

  • Our firm purchased ManageEngine M365 Manager Plus to help us protect our business from email-borne cyberthreats. We are absolutely satisfied with the features and ease of use. It has surpassed our expectations.

    Insurance agent
    Security and risk management Gartner review

A holistic Microsoft 365 administration solution

One-stop solution for all your
Microsoft 365 administration needs!

Download now