Oct 10 2019
04:02 PM
- last edited on
Feb 07 2023
07:17 PM
by
TechCommunityAP
Oct 10 2019
04:02 PM
- last edited on
Feb 07 2023
07:17 PM
by
TechCommunityAP
Hi all,
I am looking for a powershell command to get list of all users with specific plan in Office 365.
E.g. I need to get all users with Teams enabled in Office 365. I tried the following command and it didn't return anything.
Get-MsolUser -All | Where-Object {($_.licenses).AccountSkuId.ServicePlan -match "Teams1"} | select DisplayName, UserPrincipalName
I can run following command to find users with specific license, e.g. users with Office 365 E3 license, however still no success with specific plans inside E3 license
Get-MsolUser -All | Where-Object {($_.licenses).AccountSkuId -match "ENTERPRISEPACK"} | select DisplayName, UserPrincipalName
Any help, will be greatly appreciated.
Thanks in Advance.
Oct 11 2019 12:51 AM
SolutionAnd by looking did you mean actually performing a search, as I've answered this question dozen times already? :)
Here's how to do it via the MSOnline cmdlets:
Get-MsolUser | ? {$_.Licenses.ServiceStatus | ? {$_.ServicePlan.ServiceName -eq "TEAMS1" -and $_.ProvisioningStatus -eq "Success"}}
Oct 14 2019 09:39 PM
Oct 11 2019 12:51 AM
SolutionAnd by looking did you mean actually performing a search, as I've answered this question dozen times already? :)
Here's how to do it via the MSOnline cmdlets:
Get-MsolUser | ? {$_.Licenses.ServiceStatus | ? {$_.ServicePlan.ServiceName -eq "TEAMS1" -and $_.ProvisioningStatus -eq "Success"}}