How to archive teams using PowerShell
The Set-TeamArchivedState cmdlet helps you to archive a team and effectively freeze all team activities. Team admins and owners will, however, be able to add or remove members and also update their roles. You must unarchive an archived team to resume all the other user activities.
Set-TeamArchivedState -GroupId <String> -Archived <Boolean> [-SetSpoSiteReadOnlyForMembers <Boolean>] [<CommonParameters>]
Eg. PS C:\> Set-TeamArchivedState -GroupId 134r77j6-ol98-6t77-w145-90987i9l567y -Archived:$true
This cmdlet archives the group with the mentioned group ID.
Though PowerShell scripts generally help to 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 challenging. M365 Manager Plus helps simplify Microsoft Teams tasks by providing insightful reports and handy management options that don't require you to type a single PowerShell script.
How can M365 Manager Plus help?
The user-friendly interface of M365 Manager Plus enables you to archive teams in bulk using CSV files. You can get the job done in a matter of seconds without having to type long and complex group IDs or codes every time.
Steps to manage Teams archiving:
- Choose the Management & Reporting section.
- Click the Management tab.
- Navigate to Microsoft Teams → Teams Management → Team Tasks.
- Choose the Archive Team option.
- Select a suitable Microsoft 365 Tenant from the drop-down.
- You can then either enter the name of specific teams separated by commas or import a CSV file containing the team details.
- Once the teams are found and selected or imported successfully, click on Apply for the changes to be implemented.
Learn more about how M365 Manager Plus simplifies complex PowerShell tasks.