Forum Discussion

Sahin Boluk's avatar
Sahin Boluk
Copper Contributor
Apr 27, 2020
Solved

Search for users that have MS Teams enabled in O365

Trying to run a quick Powershell to find users that are enabled or disabled for MS Teams with a E3 license.   I tried the below, but it is returning all users in my environment, enabled or disabled...
  • VasilMichev's avatar
    Apr 27, 2020

    The logic in your where statement is flawed, use this instead:

     

    Get-MsolUser -All | ? {$_.Licenses.ServiceStatus | ? {$_.ServicePlan.ServiceName -eq "TEAMS1" -and $_.ProvisioningStatus -eq "Success"}}

Resources