Microsoft Teams Audit Script
Analyze Teams and Groups activity to plan your migration effectively.
What the Script Analyzes
Overview
The Microsoft Teams Audit Script is a PowerShell tool that helps you understand your organization's Teams and Groups usage patterns. Originally from Petri IT Knowledgebase and enhanced by Cloudiway, this script generates comprehensive reports to help you plan migrations effectively.
Key Features
- ✓ Discovers all Groups and Teams in your organization
- ✓ Analyzes channel message counts and last activity dates
- ✓ Tracks mailbox message volumes
- ✓ Monitors SharePoint site creation and file access dates
- ✓ Generates HTML and CSV reports
Requirements
PowerShell Modules Required
SharePoint Online PowerShell Module
Install-Module -Name Microsoft.Online.SharePoint.PowerShell
Microsoft Teams PowerShell Module
Install-Module -Name MicrosoftTeams
Administrator Access Required
Installation
Download the Script
Download the teams.ps1 script from
Cloudiway's website.
Install Required Modules
Open PowerShell as Administrator and install the required modules:
Create Output Directory
Ensure the c:\temp directory exists,
as reports will be saved there by default.
Usage Steps
Launch PowerShell
Open PowerShell (Run as Administrator recommended).
Connect to SharePoint Online
Connect using your tenant admin URL:
Connect to Microsoft Teams
Authenticate to Teams:
Execute the Script
Navigate to the script location and run:
Access the Report
Open the generated report:
Understanding the Report
The script generates both HTML and CSV reports containing detailed activity information:
HTML Report
Visual, easy-to-read format with formatted tables and summary statistics.
GroupsActivityReport.html CSV Report
Raw data format for Excel analysis and custom reporting.
GroupsActivityReport.csv Report Data Points
- • Group/Team name and type
- • Channel message counts
- • Last channel activity date
- • Mailbox message volume
- • SharePoint site status
- • Last file access date