Microsoft Teams Reporting using PowerShell

Recently, Microsoft Teams’ usage has been increasing tremendously. This increased the need of generating reports on Microsoft Teams on daily basis. Most admins and executives want to prepare reports on the number of meetings between users, meeting participants, call times, and more. But Microsoft is yet to provide the cmdlets or API to extract those data from Office 365.

Secondly, managing Teams membership and permission is the next big task. You can manage Teams through the Microsoft Teams admin center. But, getting reports on Channels in the Teams, Teams members, Teams owners, private channel members through the admin center is a bit difficult task. Because you need to navigate to multiple pages to view a single report, and there is no option to export the result. Here, Microsoft Teams PowerShell module comes into play.

By using Teams PowerShell cmdlets like Get-Team, Get-TeamChannel, Get-TeamUser, and Get-TeamChannelUseryou can get your organization’s Teams informationBut how will you get nicely formatted report? Don’t worry! We have created an All-in-One PowerShell script to export Microsoft Teams reports as CSV files. A single script can generate eight different Teams report. 

 

Script Highlights: 

  • A single script allows you to generate eight different Teams reports 
  • The script can be executed with MFA enabled accounts too. 
  • Exports output to CSV. 
  • Automatically installs Microsoft Teams PowerShell module (if not installed already) upon your confirmation. 
  • The script is scheduler friendly. I.e., Credential can be passed as a parameter instead of saving inside the script. 

 

Download Script: TeamsReports.ps1 

 

Microsoft Teams Reporting using PowerShell Script: 

As said earlier, you can use this Microsoft Teams PowerShell report for multiple use-cases. I.e., you can generate multiple Microsoft Teams reports using this script. We have listed a few significant reports here. 

Microsoft Teams Reporting 

      1.All Teams in the organization 

      2.All Teams members and owners report 

      3.Specific Teams’ members and Owners report 

      4.All Teams’ owners report 

      5.Specific Teams’ owners report 

Teams Channel Reporting 

      6.All channels in organization 

      7.All channels in a specific Team

      8.Members and Owners Report of a particular channel 

Private Channel Management and Reporting 

    You can download the script from https://blog.admindroid.com/managing-private-channels-in-microsoft-teams/ 

 

Microsoft Teams Reporting Script – Execution Steps:  

Step 1: Download the script. 

Step 2: Start Windows PowerShell as Administrator. 

Step 3: To run this script, you can choose any one of the below methods.  

 Method 1: Execute script with non-MFA account    

 

Method 2: Execute script using MFA account  

 

Method 3: Execute script by explicitly mentioning credential (Scheduler friendly) and required action  

 

Microsoft Teams Reporting PowerShell

 

Unlock the Full Potential of this Script 

Using this PowerShell script, you can get Microsoft Teams details. We have given an example to generate each report. 

 

Export All Microsoft Teams Information: 

To get a list of all teams in your organizationrun the script and select the required action from the menu or run the below code directly. 

Using this teams report, you can find orphaned teams I.e., teams without an owner. 

The exported All Teams Report contains Teams Name, Teams Type, Mail Nick Name, Description, Archived Status, Channel Count, Teams Members Count, and Teams Owners Count. 

Sample Output: 

All teams report

 

Get All Microsoft Teams’ Members and Owners Report: 

This report exports all teams membership and ownership to the CSV file. To view members and owners report, run the script and select the required action from the menu or run the below code directly. 

The exported All Teams’ Members and Owners Report contains Teams Name, Member Name, Member Email, and Role. 

Sample Output: 

Teams membership report

 

List All Members and Owners in a Specific Team: 

To export the list of teams members, run the script and select the required action from the menu or run the below code directly. 

The exported Teams Participants Report contains Member Name, Member Email, and Role. The role includes owner, member, and guest (I.e., external users). 

Sample Output: 

List team members

 

Export All Teams and Owners to CSV: 

To list teams and owners, run the PowerShell script and select the required action from the menu or run the below code directly. 

All Teams Owner Report contains Teams Name, Owner Name, and Owner Email Address. 

Sample Output: 

Microsoft Teams and Owners report

 

Export Teams Owner Report for a Specific Team: 

To export all owners from the specific team, run the script and select the required action from the menu or run the below code directly. 

The exported Teams Owner Report contains Owner Name and Owner Email. 

Sample Output: 

Teams owner report

 

List all Channels in the Organization – Tenant wide CSV Report: 

To export all channels in your organization, run the script and select the required action from the menu or run the below code directly. 

The exported All Channels Report shows details about Teams Name, Channel Name, Channel Visibility, Description, Total Members Count, and Owners Count. 

Sample Output: 

All channel report

 

Export the list of Channels in the Specific Team: 

To retrieve all channels in the specific teams, run the script and select the required action from the menu or run the below code directly. 

Teams Channel Report contains Teams Name, Channel Name, Membership Type, Description, Owner Count, and Total Members Count. 

Sample Output: 

list channels in Microsoft Teams

 

Microsoft Teams’ Channel Members Report: 

You can generate this report to get a list of channel members and owners. To export channel membership, run the script and select the required action from the menu or run the below code directly. 

This teams report shows channel members with Teams Name, Channel name, Member Name, Member Email Address, and Role. 

You can also use this report to export private channel members and owners. Else, you can use dedicated PowerShell script for managing and reporting Private Channels. 

Sample Output: 

show channel members

 

I hope this blog is useful to generate Microsoft Teams report using PowerShell. We have planned to prepare reports on Teams meeting, attendance, call duration, meeting participants once the Microsoft provides API or PowerShell cmdlets. If you want to add more Teams and Channels reports, let us know through the comment section.