This site requires JavaScript to be enabled
An updated version of this article is available

Using the Microsoft Key Management Server (KMS) to activate Windows

391 views

4.0 - Last modified on 2025-12-18 Revised by Luca Giles

3.0 - Last modified on 2025-12-16 Revised by Luca Giles

2.0 - Last modified on 2022-03-07 Revised by Natasha Batra

1.0 - Created on 2019-05-02 Authored by Jonathon Taylor

​The IST KMS service will activate the following operating systems:

To register and activate with the KMS service, simply run the following script at an elevated (Administrator context) command prompt:

Windows Vista Business:

cscript c:\windows\system32\slmgr.vbs /ipk YFKBB-PQJJV-G996G-VWGXY-2V3X8
cscript c:\windows\system32\slmgr.vbs -skms kms.ist.berkeley.edu:1688
cscript c:\windows\system32\slmgr.vbs -ato

Windows Vista Enterprise:

cscript c:\windows\system32\slmgr.vbs /ipk VKK3X-68KWM-X2YGT-QR4M6-4BWMV
cscript c:\windows\system32\slmgr.vbs -skms kms.ist.berkeley.edu:1688
cscript c:\windows\system32\slmgr.vbs -ato 

Windows Server 2008 Standard:

cscript c:\windows\system32\slmgr.vbs /ipk 4HC37-P8BYP-9KFVM-BP9X3-3HGHK
cscript c:\windows\system32\slmgr.vbs -skms kms.ist.berkeley.edu:1688
cscript c:\windows\system32\slmgr.vbs -ato

Windows Server 2008 Enterprise:

cscript c:\windows\system32\slmgr.vbs /ipk 4HC37-P8BYP-9KFVM-BP9X3-3HGHK
cscript c:\windows\system32\slmgr.vbs -skms kms.ist.berkeley.edu:1688
cscript c:\windows\system32\slmgr.vbs -ato

Windows Server 2008 Datacenter:
 
cscript c:\windows\system32\slmgr.vbs /ipk D7VVY-R3GMM-WDTG2-XVP4B-PCY4H 
cscript c:\windows\system32\slmgr.vbs -skms kms.ist.berkeley.edu:1688
cscript c:\windows\system32\slmgr.vbs -ato
 
All other versions of Windows that support KMS activation:
 
cscript c:\windows\system32\slmgr.vbs -skms kms.ist.berkeley.edu:1688
cscript c:\windows\system32\slmgr.vbs -ato
 

MS Office 2016

From an elevated CMD prompt

CD "C:\Program Files (x86)\Microsoft Office\Office16"
cscript ospp.vbs /act

If you cannot find the file "ospp.vbs" in the directory listed above it may be located at:
C:\Program Files\Microsoft Office\Office16.

If the .vbs file is not in either of the directories listed above you can search your drive for it.  
Make sure it is Office16 and not previous installs.

You should see a response which looks like the following. 

<Product activation successful>
The result is based on the current or previous installations of Office
and there may be some errors listed but you are looking for the confirmation message. 

____________________________________________________________________________________________________

A reboot will be necessary in order to complete the activation.
The KMS service will not be used to enforce licensing compliance.  This service is merely to ease the administrative burden of KMS.  IST assumes that any campus unit using the KMS service will already own a license for the version of Windows being activated.