How to List Office 365 Subscriptions Using PowerShell
Subscriptions in Office 365 define the features and services available and how many licenses you have available to issue to user accounts. Each subscription has its own Account SKU ID such as ENTERPRISEPREMIUM for E3 subscriptions.
When you reference a subscription ID in PowerShell you will need to prefix it with your 365 tenant name. This is the part before your onmicrosoft.com address you chose when creating your account. Our test lab was created as office365laba.onmicrosoft.com so office365laba is our tenant name.
To return a list of available subscriptions and the number of licenses in your tenant run the following command:
If you want to return a more detailed list, you can add | FL to the command which will show all attributes associated with a returned object in a formatted list (FL).
Get-MsolAccountSku | FL
Making use of PowerShell with Office 365 gives us lots of scripting possibilities.
Use these cmdlet’s to write a script which alerts you when you have too many or not enough licenses.
If you want to learn more then you can buy my book from Amazon, either the paper back or kindle version. My advice is to buy the paperback version so you can keep it on your desk for easy reference!