Forum Discussion
Identifying Inactive Teams
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.
You can do something like this: https://gallery.technet.microsoft.com/office/Check-for-obsolete-Office-c0020a42
- cseamanCopper Contributor
VasilMichev Dead link...anyone know another spot that this script lives?
- mvnairBrass ContributorWith Graph API beta, Get-MgReportOffice365GroupActivityDetail in powershell will return last activity date
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."
}
}