You are on page 1of 14

Information in this document, including URL and other Internet Web site

references, is subject to change without notice.


Unless otherwise noted, the companies, organizations, products, domain names,
e-mail addresses, logos, people, places, and events depicted in examples herein
are fictitious. No association with any real company, organization, product,
domain name, e-mail address, logo, person, place, or event is intended or
should be inferred.
Complying with all applicable copyright laws is the responsibility of the user.
Without limiting the rights under copyright, no part of this document may be
reproduced, stored in or introduced into a retrieval system, or transmitted in any
form or by any means (electronic, mechanical, photocopying, recording, or
otherwise), or for any purpose, without the express written permission of
Microsoft Corporation.
Microsoft may have patents, patent applications, trademarks, copyrights, or
other intellectual property rights covering subject matter in this document.
Except as expressly provided in any written license agreement from Microsoft,
the furnishing of this document does not give you any license to these patents,
trademarks, copyrights, or other intellectual property.
© 2008 Microsoft Corporation. All rights reserved.

Microsoft, Active Directory, ActiveX, Windows, Windows 2000, Windows Server,


Windows Vista, and Windows XP are either registered trademarks or trademarks
of Microsoft Corporation in the United States and/or other countries.
The names of actual companies and products mentioned herein may be the
trademarks of their respective owners.

Your privacy is important to us. Go to the Microsoft website to read the privacy statement for Windows Vista http://go.microsoft
atement for Windows Vista http://go.microsoft.com/fwlink/?LinkId=52526
WMI Properties (apply to all licensing, not only volume)
Required Privilege: Standard User
Class Name Type Description Scope Examples
SoftwareLicensingProduct ApplicationID string ID of current product's Application All 55c92734-d682-4d71-983e-d6ec3f16059f
Windows Operating System - Vista, VOLUME_KMSCLIENT
SoftwareLicensingProduct Description string Product Description All
channel
The expiration date of this product's application.
datetim
SoftwareLicensingProduct EvaluationEndDate After this date, the LicenseStatus will be All 8/29/2007 4:59:59 PM [formatted]
e
Unlicensed, and can not be activated.
Remaining time in minutes before the parent
application becomes unlicensed. For Volume
SoftwareLicensingProduct GracePeriodRemaining uint32 All 43193
clients, this is the remaining time before re-
activation is required.
SoftwareLicensingProduct ID string Product Identifier All 14478aca-ea15-4958-ac34-359281101c9
The dependency identifier for the family of SKUs
SoftwareLicensingProduct LicenseDependsOn string used to determine license relationships for add- All 14478aca-ea15-4958-ac34-359281101c8
ons.
The family identifier for the SKU used to
SoftwareLicensingProduct LicenseFamily string All 14478aca-ea15-4958-ac34-35928110112
determine license relationships for add-ons.
Indicates true if the product is identified as an
SoftwareLicensingProduct LicenseIsAddon boolean All TRUE
add-on license.
License status of this product's application.
SoftwareLicensingProduct LicenseStatus uint32 0=Unlicensed, 1=Licensed, 2=OOBGrace, All 1
3=OOTGrace, 4=NonGenuineGrace.
Software licensing server URL for the binding
SoftwareLicensingProduct MachineURL string Retail, MAK, KMS
http://go.microsoft.com/fwlink/?LinkId=51099
certificate
SoftwareLicensingProduct Name string Product Name All Windows(TM) Vista, Enterprise edition
Offline Installation Identifier of this product's
SoftwareLicensingProduct OfflineInstallationId string application. Used for offline activation. Returns Retail, MAK, KMS
000963843315259493598506854253663081409973656140419231
null if a product key is not installed.
Last five characters of this product's key. Returns
SoftwareLicensingProduct PartialProductKey string All RHXCM
null if a product key is not installed.
Software licensing server URL for the process
SoftwareLicensingProduct ProcessorURL string Retail, MAK, KMS
http://go.microsoft.com/fwlink/?LinkId=51098
certificate
Product key ID. Returns null if a product key is
SoftwareLicensingProduct ProductKeyID string All 11111-00140-009-000002-03-1033-5378.0000-1262006
not installed.
Software licensing server URL for the product
SoftwareLicensingProduct ProductKeyURL string Retail, MAK, KMS
http://go.microsoft.com/fwlink/?LinkId=51101
certificate
SoftwareLicensingProduct UseLicenseURL string Software licensing server URL for the user license Retail, MAK, KMS
http://go.microsoft.com/fwlink/?LinkId=51100

The unique identifier for this KMS client machine.


The KMS client generates CMID the first time it
SoftwareLicensingService ClientMachineID string KMS client 387c843f-9cb6-4176-bfcd-82129c770b55
attempts to connect to the Key Management
Service. CMID = NULL otherwise.
Indicates whether the machine has the Key
SoftwareLicensingService IsKeyManagementServiceMachine uint32 KMS 1
Management Service enabled: 1 if true, 0 if false.
The count of currently active volume clients. -1
KeyManagementServiceCurrentCoun indicates the machine is not enabled as a Key
SoftwareLicensingService uint32 KMS 50
t Management Service, or has not received any
client licensing requests.
KeyManagementServiceFailedReques
SoftwareLicensingService uint32 The total count of failed KMS requests. KMS 50
ts
KeyManagementServiceLicensedReq The count of KMS requests from clients with
SoftwareLicensingService uint32 KMS 50
uests License Status 1=Licensed.
The registered Key Management Service machine
name. Returns null if
SoftwareLicensingService KeyManagementServiceMachine string KMS client kms01.contoso.com
SetKeyManagementServiceMachine has not been
called.
KeyManagementServiceNonGenuine The count of KMS requests from clients with
SoftwareLicensingService uint32 KMS 50
Requests License Status is 4=NonGenuineGrace.
KeyManagementServiceOOBGraceRe The count of KMS requests from clients with
SoftwareLicensingService uint32 KMS 50
quests License Status 2=OOBGrace.
KeyManagementServiceOOTGraceRe The count of KMS requests from clients with
SoftwareLicensingService uint32 KMS 50
quests License Status 3=OOTGrace.
KeyManagementServiceProductKeyI Key Management Service product key ID.
SoftwareLicensingService string KMS client 11111-00140-008-800002-03-1033-5358.0000-1102006
D Returns null if not applicable.
KeyManagementServiceTotalRequest
SoftwareLicensingService uint32 The total count of valid KMS requests. KMS 50
s
KeyManagementServiceUnlicensedR The count of KMS requests from clients with
SoftwareLicensingService uint32 KMS 50
equests License Status 0=Unlicensed.
A flag indicating whether the licensing policy-
SoftwareLicensingService PolicyCacheRefreshRequired uint32 cache is stale. 1=Refresh required, 0=not All 0
required.
The minimum number of clients required to
SoftwareLicensingService RequiredClientCount uint32 connect to a Key Management Service machine in KMS client 25
order to enable volume licensing.
SoftwareLicensingService Version string Version of the Software Licensing service All 6.0.5378.0
The activation frequency, in minutes, of how
often the current machine should contact the Key
SoftwareLicensingService VLActivationInterval uint32 KMS, KMS client120
Management Service machine before the client is
licensed.
The renewal frequency, in minutes, of how often
the current machine should contact the Key
SoftwareLicensingService VLRenewalInterval uint32 KMS, KMS client10080
Management Service machine after the client is
licensed.

New Properties only in Windows Vista SP1/Windows Server 2008 RTM


The reason HRESULT for the current license
SoftwareLicensingService LicenseStatusReason uint32 All 0xHC004F009
status.
License status of this product's application.
0=Unlicensed, 1=Licensed, 2=OOBGrace,
SoftwareLicensingProduct LicenseStatus uint32 All 1
3=OOTGrace, 4=NonGenuineGrace,
5=Notification
KeyManagementServiceNotificationR The count of KMS requests from clients with
SoftwareLicensingService uint32 KMS 50
equests License Status 5=Notification.
Slmgr

did

dli

dli
did, ato

dli

dli
ato, dli

atp, dli

dli

dli

dli

dli

dli

dli

dli

dli
dlv

dlv
dli

dlv

dlv

dlv

dlv

dlv

dli

dlv

dli

dli

dli

dlv
WMI Methods (apply to all licensing, not only volume)
Required Privilege: Administrator
Note: This is enforced by SLAPI and registry ACLs. A registry override has been introduced for Windows Vista that allows a standard user to call specific
methods. These are designated with (*) after the method's name.
An administrator must create and set the following new registry value:
HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SL
Value Name: UserOperations
Type: DWORD
Value Data: 1
Class Name Type Parameters Description Scope
[in] string
SoftwareLicensingService InstallProductKey* unit32 Install a product key. All
ProductKey
SoftwareLicensingService InstallLicense* uint32 [in] string License Install a license for the current product. All
[in] string Install a license package for the current
SoftwareLicensingService InstallLicensePackage* uint32 All
LicensePackage product.
Sets the name of the Key Management
[in] string
SoftwareLicensingService SetKeyManagementServiceMachine uint32 Service machine to use for Volume KMS client
MachineName
Activation.
Clear Key Management Service
SoftwareLicensingService ClearKeyManagementServiceMachine uint32 KMS client
machine name.

The activation frequency, in minutes, of


how often the current machine should
contact the Key Management Service
machine before the client is licensed.
[in] uint32
SoftwareLicensingService SetVLActivationInterval uint32 The frequency must be greater than or KMS
ActivationInterval
equal to 15 and less than or equal to
43200. An error is returned if the
method is called and the machine is not
a Key Management Service.
The renewal frequency, in minutes, of
how often the current machine should
contact the Key Management Service
machine after the client is licensed. The
[in] uint32
SoftwareLicensingService SetVLRenewalInterval uint32 frequency must be greater than or KMS
RenewalInterval
equal to 15 and less than or equal to
43200. An error is returned if the
method is called and the machine is not
a Key Management Service.

SoftwareLicensingService ClearProductKeyFromRegistry uint32 Clear product key from the registry. All
Reset the licensing status of the
SoftwareLicensingService ReArmWindows* uint32 All
machine.
Update the licensing status of the
SoftwareLicensingService RefreshLicenseStatus* uint32 machine so that applications have All
access to current licensing information.
[in] string
TemplateId,
SoftwareLicensingService AcquireGenuineTicket uint32 Acquire a genuine ticket online. All
[in] string
ServerUrl
SoftwareLicensingProduct UninstallProductKey unit32 Uninstall this product's key. All
All except
SoftwareLicensingProduct Activate* uint32 Activate this product.
OEM_SLP
Activates this product by depositing an
[in] string
Offline Confirmation Identifier for this
SoftwareLicensingProduct DepositOfflineConfirmationId* uint32 InstallationId Retail, MAK, KMS
product when performing a telephone
activation.
KMS Registry Keys / Values
Registry path: HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SL

Value Type Description Scope


DisableDnsPublishing REG_DWORD Set this to a non-zero value to block auto-publishing to DNS. KMS
Set this to a non-zero value to minimize contention from KMS in a co-
hosted environment. Note that this could lead to KMS starvation,
EnableKmsLowPriority REG_DWORD KMS
depending on what other applications or server roles are active. Use with
care.
Set this value to force the use of a specific KMS system by the KMS client.
KeyManagementServiceName REG_SZ KMS client
No default. (Note: slmgr -skms <KMS> sets this.)
Set this to force the use of a specific TCP port by the KMS client when it
KeyManagementServicePort REG_SZ KMS client
communicates with a KMS. No default.
Set this on the KMS machine to cause clients using DNS auto-discovery to
KeyManagementServiceListeningPort REG_SZ KMS
communicate over this port. No default.
Create a list of fully qualified domains that KMS will use to auto-publish its
DnsDomainPublishList REG_MULTI_SZ SRV record. The KMS home domain is always used, so it is not necessary KMS
to include it here. This depends on the DisableDnsPublishing setting.

This is set initially on both MSC server and client sides. Default = 120 (in
minutes, 2 hours). WMI supports set method but only works on KMS
VLActivationInterval REG_DWORD enabled machine. KMS
KMS client initially picks up this interval from registry but switches to KMS
setting after it receives the first KMS response.

This is set initially on both MSC server and client sides. Default = 10080
(in minutes, 7 days.). WMI supports set method but only works on KMS
VLRenewalInterval REG_DWORD enabled machine. KMS
KMS client initially picks up this interval from registry but switches to KMS
setting after it receives the first KMS response.
Set this for MOM automatic discovery of the Key Management Service
(current default is to use the WMI SoftwareLicensingService Version
KeyManagementServiceVersion REG_SZ KMS
property). Delete this value if the KMS is no longer functional on the
machine.
Create and set to 1 to enable standard users to install product keys,
activate and rearm machines. With this registry setting enabled, all All (not
UserOperations REG_DWORD
product key installation, activation and rearm requests must be done just KMS)
using the built-in Slmgr.vbs script.

Registry path: HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SL\Activation

Value Type Description Scope


0 = Allow Auto-activation (Default) All (not
Manual REG_DWORD
1 = Disable Auto-activation just KMS)
0 = Activation notices and baloons will be shown (Default) All (not
NotificationDisabled REG_DWORD
1 = All activation related notices will be hidden. Not recommended. just KMS)

Registry path: HKCU\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SL


This is physically under HKUsers\S-1-5-20\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SL
(S-1-5-20 is well-known NetworkService SID)

Value Type Description Scope


KeyManagementServiceRegisteredDomainName REG_SZ Cached Domain name when KMS is enabled. This is mainly used when
KMS machine domain is changed so it re-publishes DNS RR. No default. KMS
This is a KMS-side registry setting.
KeyManagementServiceRegisteredHostName REG_SZ Cached host name when KMS is enabled. This is mainly used when KMS
machine name is changed so it re-publishes DNS RR. No default. This is a KMS
KMS-side registry setting.
KeyManagementServiceRegisteredPortNumber REG_SZ Cached port number when KMS is enabled. This is mainly used when KMS
machine name is changed so it re-publishes DNS RR. No default. This is KMS
KMS side registry setting.
DiscoveredKeyManagementServiceName REG_SZ Cached KMS machine name through discovery on KMS client. No default. KMS client
DiscoveredKeyManagementServicePort REG_SZ Cached KMS port number through discovery on KMS client. No default. KMS client
CustomerPID REG_SZ This is CSVLK PIDX, cached after KMS client is activated. This is for use by
KMS client
Customer Support Services. No default.
KMS Events logged in Windows Event Log
Log file name (except 12290): Windows Applications Logs
Log file name 12290): Applications and Services Logs\Key Management Service
Event provider name: Microsoft-Windows-Security-Licensing-SLC
Source name: Software Licensing Service
EventID Logged Description Message Parameters Examples
By Fields included in comma-delimited string
Name Description
12288 Client Request The client has sent an HRESULT Return code 0x0,
generation failure activation request to the key Status Flags (note 1) 0x8,
or after RPC management service Server:Port Name:port kms01.contoso.com:1688
submit (client) machine.%nInfo:%n%1 CMID Client Machine ID 08c3bda0-c556-4b61-9e4e-7bf6d4df80be,
Client Time Request timestamp 2006/1/14 2:30,
Indicates if the request 1,
originates from a virtual
VM Info machine
Licensing Status License status 2,
0 - Unlicensed
1 - Licensed (Activated)
2 - OOB grace
3 - OOT grace
4 - NonGenuineGrace
Time to 40123,
Expiration Time remaining (minutes)
Activation ID - identifies cf67834d-db4a-402c-ab1f-2c134f02b700,
ActID the license
Minimum count client needs 25
N-Policy to activate
12289 Client After KMS The client has processed an HRESULT Return code 0x0,
response activation response from the Status Flags (note 1) 0x4000008,
validation (client) key management service fBound Activated flag 0,
machine.%nInfo:%n%1 Unused Unused - ignore 0,
Count KMS current count 4,
Request interval when not
Activation IntervalRequest
activatedinterval
(minutues)
when 120,
Renewal Interval activated (minutes) 10080,
Client Time Request timestamp 1/14/2006 2:30
12290 KMS KMS server side An activation request has been
log for each processed.%nInfo:%n%1 HRESULT Return code 0x0,
request Client product minimum
N-Policy count needed to activate 25,
Machine Client machine name kms03.site5.contoso.com,
CMID Client Machine ID e5c98033-aab6-4d0b-9af9-1d399597dd56,
Client Time Request timestamp 2006/1/14 22:36,
12290 KMS KMS server side An activation request has been
log for each processed.%nInfo:%n%1
request

Indicates if the request


originated from a virtual
VM Info machine 1,
Licensing Status License status
0 - Unlicensed
1 - Licensed (Activated)
2 - OOB grace
3 - OOT grace,
4 - NonGenuineGrace 2,
Time to ExpirationTime remaining (minutes) 40123,
Activation ID - identifies
ActID the license cf67834d-db4a-402c-ab1f-2c134f02b700
12291 KMS KMS initialization Volume-licensed client was
failure unable to initialize the Key
Management Service renewal
timer.%nInfo:%n%1 HRESULT Return code
12292 KMS Renewal timer Key Management Service
initialization failure (KMS) failed to initialize
renewal timer.%nInfo:%n%1 HRESULT Return code
12293 KMS DNS RR publishing Publishing the Key
failure Management Service (KMS) to
DNS in the '%2' domain P1: HRESULT P1: Return code
failed.%nInfo:%n%1 P2: DNS domain P2: DNS domain name
12294 KMS DNS RR publishing Publishing the Key
success Management Service (KMS) to
DNS in the '%1' domain is
successful.%n DNS domain DNS domain name

Notes:
1 Flags:
SL_VL_BINDING_STATUS_OTHER_PC 0x00000008
SL_VL_BINDING_ERROR_NO_BINDING_SERVER_REGISTRATION 0x01000000
SL_VL_BINDING_ERROR_INVALID_REGISTRATION_DATA_TYPE 0x02000000
SL_VL_BINDING_ERROR_NOT_ENOUGH_COUNT 0x04000000
SL_VL_BINDING_ERROR_NOT_WINDOWS_SLP 0x08000000

The first one is just a warning: It’s set for E_SLP_MISSING_ACPI_SLIC for OEM check
The others are error code status codes.
RPC Request
Name Type Size Description
[bytes]
Version DWORD 4 Version control of request
VMInfo DWORD 4 Virtual machine instance if non-zero
LicenseStatus DWORD 4 Licensing status
0 - Unlicensed
1 - Licensed (Activated)
2 - OOB grace
3 - OOT grace
4 - NonGenuineGrace
BindingExpiration DWORD 4 Interval until expiration (minutes)
AppID UUID 16 Application ID
ActID UUID 16 Activation configuration ID (Product)
KMSID UUID 16 Key Management Service ID
CMID UUID 16 Client machine ID
N-Policy DWORD 4 N count policy
ClientTime FILETIME 8 Client request timestamp
CMID_prev UUID 16 Previous Client machine ID
MachineName STRING 128 Client machine's fully qualified domain name
MAC BLOB 16 MAC blob of all above data
Total 252 Request size

RPC Response
Name Type Size Description
[bytes]
Version DWORD 4 Version control of request
PID Size DWORD 4 Size of PID
PID Data BYTE Variable KMS Product Key ID. Unicode string including null
terminator (example: “11111-00116-106-000474-00-
1033-5231.0000-2782005” size: 98 (0x62))
CMID UUID 16 Client machine ID
ClientTime FILETIME 8 Client request timestamp
Count DWORD 4 Current KMS count
VLActivationInterv DWORD 4 Activation interval policy
al
VLRenewalInterval DWORD 4 Renewal interval policy
MAC BLOB 16 MAC blob of all above data
Total 60 + PID
(70+98=1
58 for
example)

You might also like