In this blog post, I will show you how to check the available licenses you have in Office 365, how many exist and how many are being used by users.
I know that it is possible to check your licenses from Office 365 portal however sometimes you would like to check it using a script or Azure automation.
Azure AD PowerShell Module
In this demo, I will use the Azure AD PowerShell module which only runs on Windows machines since it needs PowerShell 5.1.
Cmdlet
To check how many licenses and which products you have licenses to, log in to Azure AD using PowerShell with the following command:
connect-azaccount
To check the licenses run the cmdlet below.
Get-AzureADSubscribedSku | Select-Object -Property ObjectId, SkuPartNumber, ConsumedUnits -ExpandProperty PrepaidUnits | ft
Processing…
Success! You're on the list.
Whoops! There was an error and we couldn't process your subscription. Please reload the page and try again.