Archiving teams with SDS

Anitha Regupathy 5 Reputation points
2025-07-23T11:33:35.39+00:00

Archiving teams with SDS at the end of academic year

Microsoft Teams | Microsoft Teams for education | Sign up and Sign in | Other
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Anitha Regupathy 5 Reputation points
    2025-08-21T11:13:38.38+00:00

    Hi Manu,

    I have managed to bulk archive the team sites using the team's name.

    Thanks for your prompt response and support.

    1 person found this answer helpful.

  2. Manu Philip 20,641 Reputation points MVP Volunteer Moderator
    2025-07-23T11:37:56.76+00:00

    Hi Anitha Regupathy

    I think, the following article will help you out in Archiving teams with SDS

    Archiving teams with SDS


  3. Manu Philip 20,641 Reputation points MVP Volunteer Moderator
    2025-07-23T12:50:14.1566667+00:00

    Hi Anitha Regupathy

    Thanks for providing more details on your requirement!

    The Teams Admin Center itself doesn't support bulk archiving, so PowerShell is the recommended method for this. 

    I hope, you are comfortable to use a PS script to achieve your goal. Here are the steps to follow: Let's know for any clarifications on using the script

    • Create a CSV file (e.g., teams.csv)
    • Connect to Microsoft Teams using the Connect-MicrosoftTeams cmdlet in PowerShell
    • You may need to install the Microsoft Teams PowerShell module if it's not already installed. 
    • Run the following script > Copy the below code in a text file and name it something like teams.ps1
    $TeamNames = Import-CSV -Path "C:\azure\teams.csv"
    foreach ($TeamName in $TeamNames) {
        $Name = $TeamName.TeamName
        $GroupID = (Get-Team -DisplayName $Name).GroupId
        Write-Host "Enabling archive for $Name" -ForegroundColor Yellow
        Set-TeamArchivedState -GroupId $GroupID -Archived:$true | Out-Null
    }
    Write-Host "Archive enabled for teams in the CSV file" -ForegroundColor Green
    

    Here are the steps that I executed in my test Teams infrastructure. I tried archiving the selected teams using the PS script

    User's image

    User's image

    Final Output as below:

    User's image

    Hope this helps.


    --please don't forget to upvote and Accept as answer if the reply is helpful--


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.