Get-SubscriptionLicenseInfo
Gets Windows subscription licensing information.
Syntax
__AllParameterSets
Get-SubscriptionLicenseInfo
Aliases
This cmdlet has no aliases.
Description
The Get-SubscriptionLicenseInfo cmdlet queries the local software licensing service for the
Windows subscription type, status, expiration value, and edition. It returns both localized type
and status text and their underlying numeric values.
This cmdlet is read-only and doesn't enable, disable, refresh, acquire, or remove a subscription license.
Note
Get-SubscriptionLicenseInfo is available in Windows Server vNext Preview Build 29651
and the 2026-09 security update for Windows 11 (KB5124008).
Examples
Example 1: Get subscription licensing information
Get-SubscriptionLicenseInfo
This example gets the subscription type, status, expiration value, and edition for the local computer.
Example 2: Check whether subscription licensing is active
$subscription = Get-SubscriptionLicenseInfo
if ($subscription.SubscriptionStatusValue -eq 1) {
'Subscription licensing is active.'
}
This example checks the underlying numeric status value. A value of 1 represents an active
subscription.
Inputs
None
This cmdlet doesn't accept input from the pipeline.
Outputs
PSCustomObject
The cmdlet returns an object with the following properties:
- SubscriptionType - Localized text for the subscription type.
- SubscriptionTypeValue - The underlying numeric subscription type.
- SubscriptionStatus - Localized text for the subscription status.
- SubscriptionStatusValue - The underlying numeric subscription status.
- SubscriptionExpiry - The subscription expiration value returned by the licensing service.
- SubscriptionEdition - The Windows edition associated with the subscription.
For SubscriptionTypeValue, the cmdlet maps 0 to User Based Subscription, 9999 to
Invalid, and 120 to Not Installed. It formats other values as Unknown (<value>).
For SubscriptionStatusValue, the cmdlet maps 0 to Not Active, 1 to Active, 100 to
Disabled, 110 to Expired, and 120 to Not Installed. It formats other values as
Unknown (<value>).
Notes
The cmdlet returns no object when it can't obtain the local SoftwareLicensingService CIM instance or when the query fails. It returns SubscriptionExpiry without converting the value that the licensing service provides.