Forum Discussion
Kotus-Tech
Nov 03, 2020Iron Contributor
O365 E5 Licence report
Hi - I am trying to use Powershell to return a report of all users who have the Power BI pro option enabled under office 365 E5. To clarify, this is not the Power BI Pro licence that can be purch...
VasilMichev
Nov 04, 2020MVP
To list all users who have a given service plan enabled, use this:
Get-MsolUser | ? {$_.Licenses.ServiceStatus | ? {$_.ServicePlan.ServiceName -eq "BI_AZURE_P2" -and $_.ProvisioningStatus -eq "Success"}}
If you want to further narrow down by license type, just add another clause:
Get-MsolUser | ? {($_.Licenses.AccountSkuId -eq "tenant:ENTERPRISEPREMIUM") -and ($_.Licenses.ServiceStatus | ? {$_.ServicePlan.ServiceName -eq "BI_AZURE_P2" -and $_.ProvisioningStatus -eq "Success"})}