Saturday, 13 February 2016

Get list of Office 365 licenses using Powershell

Every Office 365 subscription includes different type of license plans, you can list all the available license plans (SKU ID’s) in your tenant by using the powershell cmdlet Get-MsolAccountSku.

Note: Before proceed, Install and Configure Azure AD PowerShell

The below command lists all the licenses that part of your tenant subscription, it includes no. of allowed users (ActiveUnits) and how many no. of licenses assigned to users (ConsumedUnits). So, from this result, you can conclude that how many no. of license units are available to assign new users.
Get-MsolAccountSku | Select AccountSkuId,SkuPartNumber,ActiveUnits,ConsumedUnits
The above command lists all the license plans, the plan itself includes a bundle of services. Use the following command to see the available services (sub plans). You have to get the value of SkuPartNumber from the output of above command.
$plan = Get-MsolAccountSku | Where {$_.SkuPartNumber -eq "ENTERPRISEPACK"}
I have got the below output for my license plan "ENTERPRISEPACK".
ServicePlan                                                 ProvisioningStatus
-----------                                                 ------------------
SWAY                                                        PendingActivation
INTUNE_O365                                              PendingActivation
YAMMER_ENTERPRISE                                      Success
RMS_S_ENTERPRISE                                        Success
OFFICESUBSCRIPTION                                     Success
MCOSTANDARD                                               Success
SHAREPOINTWAC                                            Success
SHAREPOINTENTERPRISE                                  Success
EXCHANGE_S_ENTERPRISE                                Success
You can refer this article: Manage Office License to assign/remove/update license and license options.

Getting license status is also one of the important task for every admin to check whether a specified license is active or expired. You can use the powershell cmdlet Get-MsolSubscription to get license status of all the available licenses.

The following command lists all the license subscriptions:
Get-MsolSubscription | Select SkuPartNumber, Status, TotalLicenses
SkuPartNumber: The SKU associated with this subscription.

Status: The status of this subscription (Enabled, Expired, or Suspended).

TotalLicenses: The number of seats included in this subscription.


No comments:

Post a Comment