View licenses and services with Office 365 PowerShell

Every Office 365 subscription consists of the following elements:

  • Licensing plans These are also known as license plans or Office 365 plans. Licensing plans define the Office 365 services that are available to users. Your Office 365 subscription may contain multiple licensing plans. An example licensing plan would be Office 365 Enterprise E3.

  • Services These are also known as service plans. Services are the Office 365 products, features, and capabilities that are available in each licensing plan, for example, Exchange Online and Office Professional Plus. Users can have multiple licenses assigned to them from different licensing plans that grant access to different services.

  • Licenses Each licensing plan contains the number of licenses that you purchased. You assign licenses to users so they can use the Office 365 services that are defined by the licensing plan. Every user account requires at least one license from one licensing plan so they can log on to Office 365 and use the services.

You can use Office 365 PowerShell to view details about the available licensing plans, licenses, and services in your Office 365 organization. For more information about the products, features, and services that are available in different Office 365 subscriptions, see Office 365 Plan Options.

Use the Azure Active Directory PowerShell for Graph module

First, connect to your Office 365 tenant.

To view summary information about your current licensing plans and the available licenses for each plan, run the following command:

Get-AzureADSubscribedSku | Select -Property Sku*,ConsumedUnits -ExpandProperty PrepaidUnits

The results contain the following information:

  • SkuPartNumber: Shows the available licensing plans for your organization. For example, ENTERPRISEPACK is the license plan name for Office 365 Enterprise E3.

  • Enabled: Number of licenses that you've purchased for a specific licensing plan.

  • ConsumedUnits: Number of licenses that you've assigned to users from a specific licensing plan.

To view details about the Office 365 services that are available in all of your license plans, first display a list of your license plans.

Get-AzureADSubscribedSku | Select SkuPartNumber

Next, store the license plans information in a variable.

$licenses = Get-AzureADSubscribedSku

Next, display the services in a specific license plan.

$licenses[<index>].ServicePlans

<index> is an integer that specifies the row number of the license plan from the display of the Get-AzureADSubscribedSku | Select SkuPartNumber command, minus 1.

For example, if the display of the Get-AzureADSubscribedSku | Select SkuPartNumber command is this:

SkuPartNumber
-------------
WIN10_VDA_E5
EMSPREMIUM
ENTERPRISEPREMIUM
FLOW_FREE

Then the command to display the services for the ENTERPRISEPREMIUM license plan is this:

$licenses[2].ServicePlans

ENTERPRISEPREMIUM is the third row. Therefore, the index value is (3 - 1), or 2.

For a complete list of license plans (also known as product names), their included service plans, and their corresponding friendly names, see Product names and service plan identifiers for licensing.

Use the Microsoft Azure Active Directory Module for Windows PowerShell

First, connect to your Office 365 tenant.

Note

A PowerShell script is available that automates the procedures described in this topic. Specifically, the script lets you view and disable services in your Office 365 organization, including Sway. For more information, see Disable access to Sway with Office 365 PowerShell.

To view summary information about your current licensing plans and the available licenses for each plan, run the following command:

Get-MsolAccountSku

Note

PowerShell Core does not support the Microsoft Azure Active Directory Module for Windows PowerShell module and cmdlets with Msol in their name. To continue using these cmdlets, you must run them from Windows PowerShell.

The results contain the following information:

  • AccountSkuId: Show the available licensing plans for your organization by using the syntax <CompanyName>:<LicensingPlan>. is the value that you provided when you enrolled in Office 365, and is unique for your organization. The value is the same for everyone. For example, in the value litwareinc:ENTERPRISEPACK, the company name is litwareinc, and the licensing plan name ENTERPRISEPACK, which is the system name for Office 365 Enterprise E3.

  • ActiveUnits: Number of licenses that you've purchased for a specific licensing plan.

  • WarningUnits: Number of licenses in a licensing plan that you haven't renewed, and that will expire after the 30-day grace period.

  • ConsumedUnits: Number of licenses that you've assigned to users from a specific licensing plan.

To view details about the Office 365 services that are available in all of your license plans, run the following command:

Get-MsolAccountSku | Select -ExpandProperty ServiceStatus

The following table shows the Office 365 service plans and their friendly names for the most common services. Your list of service plans might be different.

Service plan Description
SWAY
Sway
TEAMS1
Microsoft Teams
YAMMER_ENTERPRISE
Yammer
RMS_S_ENTERPRISE
Azure Rights Management (RMS)
OFFICESUBSCRIPTION
Office Professional Plus
MCOSTANDARD
Skype for Business Online
SHAREPOINTWAC
Office
SHAREPOINTENTERPRISE
SharePoint Online
EXCHANGE_S_ENTERPRISE
Exchange Online Plan 2

For a complete list of license plans (also known as product names), their included service plans, and their corresponding friendly names, see Product names and service plan identifiers for licensing.

To view details about the Office 365 services that are available in a specific licensing plan, use the following syntax.

(Get-MsolAccountSku | where {$_.AccountSkuId -eq "<AccountSkuId>"}).ServiceStatus

This example shows the Office 365 services that are available in the litwareinc:ENTERPRISEPACK (Office 365 Enterprise E3) licensing plan.

(Get-MsolAccountSku | where {$_.AccountSkuId -eq "litwareinc:ENTERPRISEPACK"}).ServiceStatus

New to Office 365?

Tip

LinkedIn logo New to Office 365?

Discover free video courses for Office 365 admins and IT pros, brought to you by LinkedIn Learning.

See also

Manage user accounts and licenses with Office 365 PowerShell

Manage Office 365 with Office 365 PowerShell

Getting started with Office 365 PowerShell