Microsoft Teams Archive - GUI / Powershell/Powershellscript/Reports

 Hello All

Hope everyone is doing great and today we are going to cover the below topics in this blog

1. what is MS Team Archive

2. Two ways to Archive MS Teams

3. GUI and Powershell 

4. Bulk Archival of MS Teams and why we need bulk archival

5. Finally, the reporting archival status. 




what is MS Team Archive

Archive a team when it’s no longer active, but you want to keep it around for reference or to reactivate in the future. The conversations and files in the team become read-only once you archive it. You’ll still be able to search through it for stuff you need—you can even keep it as a favourite. Only team owners can archive and restore teams.


Ways to Do 

we can do the archive either from teams client and Teams powershell

Archive a team in Teams Client 

  1. Select Teams  on the left to see the list of your teams.

  2.  select Manage Teams

  3. In the Manage Teams, find the name of the team you want to archive, then select More options More options button > Archive team.



To prevent people from editing the content in the SharePoint site and Wiki tab associated with the team, select Make the SharePoint site read-only for team members (team owners will still be able to edit this content).

Powershell to archive - Single Teams

The command is Set-TeamArchivedState

Ramki: 01/03/2024 16:43:29>Set-TeamArchivedState -GroupId a1c51541-67ce-4c34-b3a9-88b13959c28f -Archived:$True

GroupId                              DisplayName        Visibility  Archived  MailNickName       Description

-------                              -----------        ----------  --------  ------------       -----------

a1c51541-67ce-4c34-b3a9-88b13959c28f Mark 8 Project ... Public      True      Mark8ProjectTea... Welcome to the ...


Bulk Archival of MS Teams

$csv = Import-Csv C:\Users\ramki\Desktop\arc.csv

foreach ($team in $csv) {

    Set-TeamArchivedState -GroupId $team.id -Archived:$true

}

 It will be useful for universities or schools to archive bulk teams when an academic year ends.

if you  want to archive teams time to time in the end of the session with keyword like '2023', 'Class-VI-A', 'BCA', 'PA'.


Get-Team | Where {$_.DisplayName -like "*2020*" | Set-TeamArchivedState -Archived:$true

Reports

To get all the archived teams in the Microsoft Teams, we can use the following PowerShell cmdlet.

Ramki: 01/03/2024 16:46:51>Get-Team | where {$_.Archived -eq $true}




GroupId                              DisplayName        Visibility  Archived  MailNickName       Description

-------                              -----------        ----------  --------  ------------       -----------

8c052697-824d-47bc-978b-55457fe2a9ab Archive Test01     Public      True      ArchiveTest01      Archive Test01

a1c51541-67ce-4c34-b3a9-88b13959c28f Mark 8 Project ... Public      True      Mark8ProjectTea... Welcome to the ...


I hope this article helps us in managing teams’ archives and happy learning 😃

Comments