Identifying Inactive Teams

Copper Contributor

Hello,

 

I am trying to identify inactive Teams, I work for a reasonably sized company so we have hundreds of Teams setup. I have tried running a Usage Report but that only shows Teams that have had activity within the last 7, 28 or 90 days, if a Team has had no activity for over 90 days it does not seem to appear within the report.

 

So far the only way in which I have come up with identifying these inactive Teams is to compare the Usage report with the list of Teams manually which is less than ideal. Are there any alternatives that I am missing? I have read about running some kind of Powershell script but I am not that familiar with using Powershell.

 

Thanks for any suggestions.

5 Replies

@VasilMichev Dead link...anyone know another spot that this script lives?

With Graph API beta, Get-MgReportOffice365GroupActivityDetail in powershell will return last activity date

@SteveM72 

 

Take this:

 

# Connect to Microsoft Teams
Connect-MicrosoftTeams

# Get all Teams
$teams = Get-Team

# Loop through each Team and check activity
foreach ($team in $teams) {
$activity = Get-TeamUserActivityUserDetail -TeamId $team.GroupId -StartDate (Get-Date).AddDays(-90)
if ($activity.Count -eq 0) {
Write-Output "Team $($team.DisplayName) is inactive."
}
}