Share via

Archive Teams using powershell

Anonymous
2020-07-03T07:03:11+00:00

Hi Team,

Can somebody please help me with a powershell script to archive ms teams based on their group id or email id from an input list like txt or csv. Remove all the owners and members and make a new user account as the new owner ?

Microsoft Teams | Microsoft Teams for education | Teams and channels | Manage a team or channel

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

5 answers

Sort by: Most helpful
  1. Anonymous
    2020-07-04T18:44:51+00:00

    The second link has examples on how to archive based on group ID and with or without option to make it visible to members.

    This link shows how to arkive based on cvs file containing the list of ID

    https://office365itpros.com/2020/07/03/archivin...

    External Links Disclaimer for non-Microsoft website. The page appears to be providing accurate, safe information. Watch out for ads on the site that may advertise products frequently classified as a PUP (Potentially Unwanted Products). Thoroughly research any product advertised on the site before you decide to download and install it.

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2020-07-04T17:36:01+00:00

    Hi @Raffaele,

    Thanks for the reply. I can download the group ID and few other details from the azure active directory as below. Will these info be helpful to run a script to archive the teams based on the ID or email address of the 0365 group ?

    1. Archive the Teams based on an input list (csv or txt) with the below info.
    2. Remove the current owners and members and add a new owner.
    id displayName groupType membershipType source mail
    ccd84f2e-7b8c-4137-afd2-3c561d03c128 GCS-Grade1A Office Assigned Cloud ******@ABC.onmicrosoft.com
    5cf8gff9-cac3-415c-be6f-157e15f6221d GCS-Grade1B Office Assigned Cloud Grade1B@@ABC.onmicrosoft.com
    81id75db-c35e-49fb-a480-13d18b908f09 GCS-Grade1C Office Assigned Cloud ******@ABC.onmicrosoft.com

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2020-07-03T10:24:13+00:00

    If there is no sequence or particular filter to bulk retrieve the group ID's and so it can't help writing a cycle you'll have to retrieve the 400 ID's individually.

    https://docs.microsoft.com/en-us/powershell/mod...

    https://sprider.blog/add-remove-bulk-users-to-f...

    External Links Disclaimer for non-Microsoft website. The page appears to be providing accurate, safe information. Watch out for ads on the site that may advertise products frequently classified as a PUP (Potentially Unwanted Products). Thoroughly research any product advertised on the site before you decide to download and install it.

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2020-07-03T10:09:23+00:00

    Hi Raffaele,

    I have seen those documents and wont serve my requirment. It will archive the teams one by one. I got around 400 teams to archive. Also i need to remove the owners and members from the teams and add a new owner for compliance purpose.

    Was this answer helpful?

    0 comments No comments
  5. Anonymous
    2020-07-03T09:46:43+00:00

    Hi MuhamedRafeeq,

    Have you already checked the following documentations:

    Get teams ID example

    https://docs.microsoft.com/en-us/powershell/mod...

    Archive teams based on ID example

    https://docs.microsoft.com/en-us/powershell/mod...

    Hope the information provided is useful. If the issue persists or have any other questions, reply here and I will be glad to help you.

    Kind regards,

    Raffaele

    Was this answer helpful?

    0 comments No comments