In this article, we will cover the Invoke-MgUnarchiveTeam
cmdlet, which is designed to unarchive Microsoft Teams. Archiving teams is a common practice for preserving past projects, but sometimes these teams need to be restored for active use. This cmdlet allows administrators to bring archived teams back into action.
Invoke-MgUnarchiveTeam -TeamId <String> [-BodyParameter <Hashtable>]
TeamId: The required parameter representing the ID of the archived team to unarchive.
Invoke-MgUnarchiveTeam -TeamId "5b6d987a-42f2-4b13-b9e7-46db673b1a3f"
This command restores the archived team with the ID 5b6d987a-42f2-4b13-b9e7-46db673b1a3f
to its active state, making it available for all team members again.
$teams = @("team-id-1", "team-id-2", "team-id-3")
foreach ($team in $teams) {
Invoke-MgUnarchiveTeam -TeamId $team
}
This script unarchives multiple teams, ensuring that all specified teams are restored to an active state.
For larger environments where you need to unarchive multiple teams at once, you can use a CSV file. The CSV should have a column header called TeamId that lists the IDs of the teams you want to unarchive. Example CSV content (teams.csv):
TeamId
5b6d987a-42f2-4b13-b9e7-46db673b1a3f
7c9e214d-6b58-4b13-b2f6-3e9c878a34a5
11fcd582-7a46-4bb5-8a3a-b2a6db789b68
PowerShell script for bulk unarchiving:
$teams = Import-Csv -Path "C:\Path\to\teams.csv"
foreach ($team in $teams) {
Invoke-MgUnarchiveTeam -TeamId $team.TeamId
}
This script reads the TeamId
column from the CSV and unarchives each team listed.
TeamId
provided is valid. If the team has never been archived or does not exist, the cmdlet will not work.Error | Cause | Solution |
Team Not Found | Invalid TeamId or team does not exist. |
Verify the TeamId is correct and the team exists. |
Insufficient Permissions | User lacks sufficient privileges. | Ensure that the user has the necessary admin role in Teams. |
Invalid Request - Team is Already Active | The team is already active, not archived. | Double-check the team’s archive status before running the cmdlet. |
Throttling Issue - Rate Limiting Applied | Too many requests in a short period. | Reduce the frequency of requests or use batching. |
Invoke-MgUnarchiveTeam
cmdlet allows compliance officers to restore access to these teams without recreating them.The Invoke-MgUnarchiveTeam
cmdlet is an essential tool for any Microsoft 365 administrator tasked with managing archived Teams. By providing the ability to unarchive individual or multiple Teams, administrators can maintain an efficient workflow and restore collaboration tools as needed. Whether you're reactivating project teams, seasonal groups, or compliance-related teams, this cmdlet ensures that archived data can be quickly accessed and used again.
Using bulk unarchiving via CSV adds another layer of efficiency, especially for larger organizations. With the right permissions and the correct use of Team IDs, this cmdlet provides a seamless way to bring archived Teams back into the active roster.
© m365corner.com. All Rights Reserved. Design by HTML Codex