Simplify user tasks like bulk creation, updates, password resets, deletions, license checks & more — all from one place.
🚀 Launch ToolkitMicrosoft Teams is one of the most widely used collaboration tools in modern workplaces. As your organization grows, you might find yourself managing dozens—or even hundreds—of Teams. Over time, many of these Teams may no longer be active but still contain important information that must be preserved.
Instead of deleting them, you can archive Teams to make them read-only while retaining access to files, conversations, and channels. This article explains what Teams archiving is, how to archive Teams using Microsoft Graph PowerShell, and provides practical examples using the Invoke-MgArchiveTeam cmdlet.
Archiving a Team means setting it to a read-only state where members can view conversations and files but can’t make changes.
This is particularly useful for:
When a Team is archived:
To archive Teams using Microsoft Graph PowerShell, follow these steps:
Install-Module Microsoft.Graph
Import-Module Microsoft.Graph
Connect-MgGraph -Scopes "Team.ReadWrite.All"
The Invoke-MgArchiveTeam cmdlet is used to archive a specific Microsoft Team by passing its unique Team ID.
Once archived, members can still access the Team’s content, but all operations become read-only.
Syntax:
Invoke-MgArchiveTeam -TeamId
Parameter:
Let’s look at practical examples of archiving Teams using Microsoft Graph PowerShell.
$$TeamId = "72bd013b-42ff-4b6e-b84b-5209e3b22bcb"
Invoke-MgArchiveTeam -TeamId $TeamId
This command archives the specified Team, setting it to a read-only state for all users.
$TeamIds = @("72bd013b-42ff-4b6e-b84b-5209e3b22bcb", "33d343b2-123e-42af-9f2c-6dcfd8ac8d45")
foreach ($TeamId in $TeamIds) {
Invoke-MgArchiveTeam -TeamId $TeamId
}
This script loops through the list of Team IDs and archives each Team one by one.
For large organizations, it’s often easier to manage Team archiving through a CSV file.
Create a CSV file named teams-to-archive.csv with the following structure:
TeamId
72bd013b-42ff-4b6e-b84b-5209e3b22bcb
33d343b2-123e-42af-9f2c-6dcfd8ac8d45
f5a7713b-9c1e-48d2-8a42-d56d634ab213
Then, run this PowerShell script:
$Teams = Import-Csv -Path "C:\path\to\teams-to-archive.csv"
foreach ($Team in $Teams) {
Invoke-MgArchiveTeam -TeamId $Team.TeamId
}
This script imports the CSV, iterates through each entry, and archives every Team listed.
Archiving Teams using Graph PowerShell is a clean and efficient way to manage inactive Teams while maintaining data integrity.
The Invoke-MgArchiveTeam cmdlet allows administrators to easily archive individual Teams, multiple Teams, or even automate the process using CSV files.
By incorporating this cmdlet into your regular maintenance tasks, you can ensure a well-organized Teams environment—keeping your tenant clutter-free while retaining essential collaboration history.
Did You Know? Managing Microsoft 365 applications is even easier with automation. Try our Graph PowerShell scripts to automate tasks like generating reports, cleaning up inactive Teams, or assigning licenses efficiently.
Ready to get the most out of Microsoft 365 tools? Explore our free Microsoft 365 administration tools to simplify your administrative tasks and boost productivity.
© Your Site Name. All Rights Reserved. Design by HTML Codex