Get-KmsLicenseInfo
Gets Key Management Service (KMS) licensing information.
Syntax
__AllParameterSets
Get-KmsLicenseInfo
Aliases
This cmdlet has no aliases.
Description
The Get-KmsLicenseInfo cmdlet queries the local software licensing service for KMS client and KMS
host configuration, activation intervals, discovery information, and request counts. The cmdlet is
read-only and doesn't change the licensing configuration.
The cmdlet returns KMS service properties for the local computer. When it finds a Windows operating system licensing product with a partial product key, it also returns activation and renewal intervals and information about the discovered KMS host.
Note
Get-KmsLicenseInfo is available in Windows Server vNext Preview Build 29651
and the 2026-09 security update for Windows 11 (KB5124008).
Examples
Example 1: Get KMS client configuration
Get-KmsLicenseInfo |
Select-Object KeyManagementServiceMachine, KeyManagementServicePort,
KeyManagementServiceLookupDomain, KeyManagementServiceHostCaching
This example gets the configured KMS client host, port, lookup domain, and host-caching setting.
Example 2: Review KMS host request counts
Get-KmsLicenseInfo |
Select-Object IsKeyManagementServiceMachine, KeyManagementServiceListeningPort,
KeyManagementServiceCurrentCount, KeyManagementServiceLicensedRequests,
KeyManagementServiceFailedRequests, KeyManagementServiceTotalRequests
This example selects KMS host configuration and request-count properties from the returned object.
Inputs
None
This cmdlet doesn't accept input from the pipeline.
Outputs
PSCustomObject
The cmdlet returns an object with the following KMS service properties:
- KeyManagementServiceMachine
- KeyManagementServicePort
- KeyManagementServiceLookupDomain
- IsKeyManagementServiceMachine
- KeyManagementServiceListeningPort
- KeyManagementServiceDnsPublishing
- KeyManagementServiceHostCaching
- KeyManagementServiceLowPriority
- KeyManagementServiceCurrentCount
- KeyManagementServiceUnlicensedRequests
- KeyManagementServiceLicensedRequests
- KeyManagementServiceOOBGraceRequests
- KeyManagementServiceOOTGraceRequests
- KeyManagementServiceNonGenuineGraceRequests
- KeyManagementServiceTotalRequests
- KeyManagementServiceNotificationRequests
- KeyManagementServiceFailedRequests
When a Windows operating system licensing product is available, the object also includes VLActivationInterval, VLRenewalInterval, DiscoveredKeyManagementServiceMachineName, and DiscoveredKeyManagementServiceMachinePort.
Notes
The cmdlet returns no object when it can't obtain the local SoftwareLicensingService CIM instance or when a CIM query fails.
When KMS request-count or current-count data isn't available, the cmdlet returns N/A instead of
the numeric value that the licensing service uses to indicate unavailable data.