Friday, August 12, 2011

Convert MAK to KMS Client or KMS Host to Client with slmgr.vbs

By default all Windows Vista and above clients are shipped as a KMS client with a GVLK installed. So, by default if you have a KMS host setup then any new installs will work immediately with your KMS environment.
Lets take a look:
on a fresh system open cmd and go to C:\Windows\System32
run cscript slmgr.vbs /dlv
It will report a KMSCLient
Name: Windows Server(R), ServerStandard edition
Description: Windows Operating System - Windows Server(R), VOLUME_KMSCLIENT channel
Activation ID:
Application ID: 55c92734-d682-4d71-983e-d6ec3f16059f
Extended PID:
Installation ID:
Partial Product Key: BFGM2
License Status: Initial grace period
Time remaining: 86400 minute(s) (60 day(s))

Key Management Service client information
Client Machine ID (CMID):
DNS auto-discovery: KMS name not available
KMS machine extended PID:
Activation interval: -1 minutes
Renewal interval: -1 minutes
Note the partial product key is BFGM2. Also note the description contains VOLUME_KMSCLIENT channel. From the following link provided by MS we can see that this is the key for Windows Server 2008 Standard KMSClient
http://technet.microsoft.com/en-us/library/ff793421.aspx

But lets say you already activated this client with a MAK key or as a KMS Host with the KMS key and now you want it to be a client again. This process is as simple as changing the key back to the GVLK key.

Note: To convert from MAK to KMSClient it is the exact same steps. (the volume descriptions will be different to represent the MAK instead of KMSHost)
__________________________________________________________________________

In the following example the admin accidentally activated the system using the KMS host key.

- Note that running slmgr.vbs /dlv shows it's a KMS Host
C:\Windows\System32>cscript slmgr.vbs /dlv
Microsoft (R) Windows Script Host Version 5.7
Copyright (C) Microsoft Corporation. All rights reserved.

Software licensing service version: 6.0.6002.18005
Name: Windows Server(R), ServerStandard edition
Description: Windows Operating System - Windows Server(R), VOLUME_KMS_B channel
Activation ID:
Application ID: 55c92734-d682-4d71-983e-d6ec3f16059f
Extended PID:
Installation ID:
Processor Certificate URL: http://go.microsoft.com/fwlink/?LinkID=48189
Machine Certificate URL: http://go.microsoft.com/fwlink/?LinkID=48190
Use License URL: http://go.microsoft.com/fwlink/?LinkID=48192
Product Key Certificate URL: http://go.microsoft.com/fwlink/?LinkID=48191
Partial Product Key:
License Status: Licensed

Key Management Service is enabled on this machine
Current count: 0
Listening on Port: 1688
DNS publishing enabled
KMS priority: Normal

Key Management Service cumulative requests received from clients
Total requests received: 0
Failed requests received: 0
Requests with License Status Unlicensed: 0
Requests with License Status Licensed: 0
Requests with License Status Initial grace period: 0
Requests with License Status License expired or Hardware out of tolerance: 0
Requests with License Status Non-genuine grace period: 0
Requests with License Status Notification: 0

- We can see that it's Windows Server 2008 Standard so we can go to our friends at MS and grab the correct GVLP key of TM24T-X9RMF-VWXK6-X8JC9-BFGM2 (http://technet.microsoft.com/en-us/library/ff793421.aspx)


- Then run cscript slmgr.vbs /ipk TM24T-X9RMF-VWXK6-X8JC9-BFGM2
C:\Windows\System32>cscript slmgr.vbs /ipk TM24T-X9RMF-VWXK6-X8JC9-BFGM2
Microsoft (R) Windows Script Host Version 5.7
Copyright (C) Microsoft Corporation. All rights reserved.

Installed product key TM24T-X9RMF-VWXK6-X8JC9-BFGM2 successfully.
- Now if we run cscript slmgr.vbs /dlv again we see
C:\Windows\System32>cscript slmgr.vbs /dlv
Microsoft (R) Windows Script Host Version 5.7
Copyright (C) Microsoft Corporation. All rights reserved.

Software licensing service version: 6.0.6002.18005
Name: Windows Server(R), ServerStandard edition
Description: Windows Operating System - Windows Server(R), VOLUME_KMSCLIENT channel
Activation ID:
Application ID: 55c92734-d682-4d71-983e-d6ec3f16059f
Extended PID:
Installation ID:
Partial Product Key: BFGM2
License Status: Initial grace period
Time remaining: 86400 minute(s) (60 day(s))

Key Management Service client information
Client Machine ID (CMID):
DNS auto-discovery: KMS name not available
KMS machine extended PID:
Activation interval: -1 minutes
Renewal interval: -1 minutes

- Now we can activate it with the KMS Host that you already have setup on the proper server using cscript slmgr.vbs /ato
C:\Windows\System32>cscript slmgr.vbs /ato
Microsoft (R) Windows Script Host Version 5.7
Copyright (C) Microsoft Corporation. All rights reserved.

Activating Windows Server(R), ServerStandard edition...
Product activated successfully.

- Then you can run cscript slmgr.vbs /dlv again and get a good activation description
C:\Windows\System32>cscript slmgr.vbs /dlv
Microsoft (R) Windows Script Host Version 5.7
Copyright (C) Microsoft Corporation. All rights reserved.
Software licensing service version: 6.0.6002.18005
Name: Windows Server(R), ServerStandard edition
Description: Windows Operating System - Windows Server(R), VOLUME_KMSCLIENT channel
Activation ID:
Application ID: 55c92734-d682-4d71-983e-d6ec3f16059f
Extended PID:
Installation ID:
Partial Product Key: BFGM2
License Status: Licensed
Volume activation expiration: 259200 minute(s) (180 day(s))
Key Management Service client information
    Client Machine ID (CMID): 5a05921b-8405-4d46-af89-f40a3d60b698
    KMS machine name from DNS: machinename.fqdn:1688
    KMS machine extended PID:
    Activation interval: 120 minutes
    Renewal interval: 10080 minutes



From this we can see that we've now successfully activated the KMSClient against the KMS Host listed at "KMS machine name from DNS:" and that it will activate again in 180 days.

Once again, here's the KMS Client Setup Keys
http://technet.microsoft.com/en-us/library/ff793421.aspx

1 comment: