Jump to content

Microsoft Teams - Housekeeping Teams . . .


Recommended Posts

Posted

Hi,

 

I expect that there are a few schools in the same situation. We have automated creation of our Teams in M365 (Classes from our MIS - Sims.net) via Salamandersoft (Using Microsoft SDS) which works great.

 

We would like to have a way of housekeeping and removing old teams in bulk (due to the amount of teams, it is not quick or feasible to manually delete these one at a time). Ideally, we'd only keeping a +1 year.

 

Has anybody had any experience of this or a successful solution in place?

 

Many Thanks,

Adrian

Posted

I haven't done it myself, but if Salamander don't say "yeah, we can automate that by making old teams (linked to classes) read-only and flushing them after a year", I'd be very surprised. Give them a shout.

 

The only caveat I'd put in would be some sanity-checking and an "I'm about to delete these Teams" email to IT in advance in case your SIMS admins are a bit cowboy-ish.

  • Thanks 1
Posted

Salamander put the year in our Team.

 

So a quick Powershell command would be able to find all Teams that include “2021” and delete them.

  • Thanks 1
Posted
Thank you Pete, Although Salamander does a great job (and no disrespect to them), unfortunately I've been advised by their support that they are unable to delete or archive any of the old teams.
Posted (edited)

You should be able to do this in the SDS profile Salamander use to create the teams in the first place.

 

There is a clean-up procedure, which in a nutshell accepts a CSV of teams IDs (which you can get from a report in SDS too) and will the Expire and archive the teams you specify.

 

This then inturn makes them read-only, and moves them to the Archived section for the end user in the Teams client.

Edited by smithson83
Posted

Thank you Snagrat, We also have the year group in our team.

 

Is this something that you have done before? I'm always weary of running scripts that do things in bulk (so want to be 100% sure that it's not going to be destructive beyond intention) although I've been doing some searching around forums.

Posted
Thank you Snagrat, We also have the year group in our team.

 

Is this something that you have done before? I'm always weary of running scripts that do things in bulk (so want to be 100% sure that it's not going to be destructive beyond intention) although I've been doing some searching around forums.

 

No I don’t, I use the SDS cleanup method.

Posted (edited)
Thank you Smithson83, that sounds very interesting and positive. I'll look into that one :-)

 

We've used both routes, SDS cleanup works well if it had a profile, but also if you want to script it can delete the groups behind the teams to remove them (Just change the displayname part to what matches yours, and if you want to test it prior to running it live just add a # before the Remove part to comment it out so it just outputs the names it'll run against)

 

If you don't have the module downloaded you'll need to install that via powershell first

 

Connect-ExchangeOnline -UserPrincipalName [email protected]

$Groups = Get-UnifiedGroup -ResultSize Unlimited | ? {$_.DisplayName -like "ABC-22-23*"}

Foreach ($Group in $Groups) {

Write-Host $Group.DisplayName
Remove-UnifiedGroup -Identity $Group.Name -confirm:$False
}

Disconnect-ExchangeOnline -Confirm:$False

 

Steve

Edited by Steve21

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...