Forum Discussion

SteveM72's avatar
SteveM72
Copper Contributor
May 20, 2020

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.

5 Replies

  • 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."
    }
    }

  • mvnair's avatar
    mvnair
    Brass Contributor
    With Graph API beta, Get-MgReportOffice365GroupActivityDetail in powershell will return last activity date
      • DanM595's avatar
        DanM595
        Copper Contributor

        cseaman 

        Similar https://github.com/12Knocksinna/Office365itpros/blob/master/TeamsGroupsActivityReportV5.PS1