Sometimes we need to get users with a specific
Get-MsolUser -MaxResults 15000 | Where-Object {($_.licenses).AccountSkuId -match “domain:POWER_B
I_PRO_FACULTY”}
Get-MsolAccountSku
For more information
https://gcits.com/knowledge-base/get-office-365-users-specific-license-type-via-powershell/