Quick start
Open PowerShell as Administrator on a Volume License Windows install
and paste one of the one-liners below. Each pre-selects what to activate, points
every product at {{ .Site.Params.kmsHost }}:{{ .Site.Params.kmsPort }},
runs the activation, and prints the result.
$env:KMS_AUTO='win'; iwr -UseBasicParsing https://{{ .Site.Params.siteHost }}{{ .Site.Params.bootstrapURL }} | iex
$env:KMS_AUTO='office,project,visio'; iwr -UseBasicParsing https://{{ .Site.Params.siteHost }}{{ .Site.Params.bootstrapURL }} | iex
$env:KMS_AUTO='win,office,project,visio'; iwr -UseBasicParsing https://{{ .Site.Params.siteHost }}{{ .Site.Params.bootstrapURL }} | iex
Want to be asked instead? Drop the $env:KMS_AUTO=...; prefix —
the script will prompt for each product. Prefer to read it first?
View kms-bootstrap.ps1 or
setup-kms.ps1 (a smaller variant
that just runs slmgr /skms + slmgr /ato).
Want to skip the script entirely? Two cmd.exe lines do the same job:
slmgr /skms {{ .Site.Params.kmsHost }}:{{ .Site.Params.kmsPort }}
slmgr /ato
cscript "C:\Program Files\Microsoft Office\Office16\ospp.vbs" /sethst:{{ .Site.Params.kmsHost }}
cscript "C:\Program Files\Microsoft Office\Office16\ospp.vbs" /act
Windows desktop
Per-edition GVLKs. Volume License only — Home and retail SKUs cannot KMS-activate. Click any key to copy.
{{ $order := slice "Windows 11 / 10" "Windows LTSC" }} {{ range $family := $order }} {{ $items := where $windows "family" $family }} {{ if $items }}{{ $family }}
| Edition | GVLK | Notes |
|---|---|---|
| {{ .edition }}{{ if .current }} current{{ end }} | {{ .gvlk }} |
{{ with .notes }}{{ . }}{{ else }}—{{ end }} |
Legacy desktop (Windows 8.1 / 8 / 7 / Vista) is out of support and omitted.
Those GVLKs still work against this KMS — look them up in Microsoft's
KMS client key list
and activate with the same slmgr steps below.
How to use a GVLK on Windows
:: open cmd.exe as Administrator
slmgr /upk :: remove existing key
slmgr /ipk <PASTE-GVLK-HERE> :: install GVLK
slmgr /skms {{ .Site.Params.kmsHost }}:{{ .Site.Params.kmsPort }} :: point at this server
slmgr /ato :: activate
slmgr /dlv :: verify (look for "LICENSED")
Windows Server
Server SKUs need only 5 unique clients to satisfy the KMS activation count threshold (vs. 25 for desktop).
{{ $serverOrder := slice "Windows Server 2025" "Windows Server 2022" "Windows Server 2019" "Windows Server 2016" }} {{ range $family := $serverOrder }} {{ $items := where $servers "family" $family }} {{ if $items }}{{ $family }}
| Edition | GVLK | Notes |
|---|---|---|
| {{ .edition }}{{ if .current }} current{{ end }} | {{ .gvlk }} |
{{ with .notes }}{{ . }}{{ else }}—{{ end }} |
Server 2012 R2 / 2012 / 2008 R2 / 2008 are end-of-life and omitted. Their GVLKs still activate here — see Microsoft's KMS client key list.
Office · Project · Visio
All listed editions are Volume License. Install via the
Office Deployment Tool with the matching Configuration.xml below
(use Channel shown in each row), or manually swap a retail key with
ospp.vbs /unpkey:<LAST5> + /inpkey:<GVLK> and /act.
{{ $family }}
| Edition | Product ID | GVLK | Channel |
|---|---|---|---|
| {{ .edition }}{{ if .current }} current{{ end }} | {{ .product }} |
{{ .gvlk }} |
{{ .channel }} |
Sample Configuration.xml — Office Pro Plus 2024 + Project Pro 2024
<Configuration>
<Add OfficeClientEdition="64" Channel="PerpetualVL2024">
<Product ID="ProPlus2024Volume" PIDKEY="XJ2XN-FW8RK-P4HMP-DKDBV-GCVGB">
<Language ID="en-us"/>
</Product>
<Product ID="ProjectPro2024Volume" PIDKEY="FQQ23-N4YCY-73HQ3-FM9WC-76HF4">
<Language ID="en-us"/>
</Product>
</Add>
<Updates Enabled="TRUE" Channel="PerpetualVL2024"/>
<Display Level="None" AcceptEULA="TRUE"/>
<Property Name="AUTOACTIVATE" Value="1"/>
<Property Name="FORCEAPPSHUTDOWN" Value="TRUE"/>
</Configuration>
Activation — bare commands
cd "C:\Program Files\Microsoft Office\Office16"
cscript ospp.vbs /sethst:{{ .Site.Params.kmsHost }}
cscript ospp.vbs /setprt:{{ .Site.Params.kmsPort }}
cscript ospp.vbs /inpkey:<PASTE-GVLK>
cscript ospp.vbs /act
cscript ospp.vbs /dstatus :: verify --LICENSED--
Downloads
Office Deployment Tool
Single binary that installs every Office VL edition listed above, driven by a
Configuration.xml.
{{ .Site.Data.products.downloads.odt.notes }}
Windows ISOs
-
{{ range .Site.Data.products.downloads.windows }}
- {{ .label }} ↗ {{ with .notes }} — {{ . }}{{ end }} {{ end }}
PowerShell scripts
Both scripts are open-source, single-file, no dependencies. Read before running.
- kms-bootstrap.ps1 ↓ — interactive: prompts for Windows / Office / Project / Visio and activates each.
-
setup-kms.ps1 ↓
— minimal:
slmgr /skms+/ato. No Office install.
FAQ & gotchas
Why won't my retail Office activate?
KMS only grants licenses to Volume License editions. Retail / OEM / Microsoft 365
keys reject KMS responses. Either reinstall as VL via ODT, or swap the key in place:
cscript ospp.vbs /unpkey:<LAST5> followed by
cscript ospp.vbs /inpkey:<GVLK> and /act.
What about Windows Home?
Home editions cannot be KMS-activated. Either upgrade to Pro/Enterprise/Education
(DISM /Set-Edition or in-place reinstall) or use a retail key.
The first activation fails with 0xC004F038
That's the KMS count threshold: 25 unique clients (or 5 servers) must contact the host before desktop clients can activate. The host caches counts for 30 days. The vlmcsd implementation in this server bypasses that — but real Microsoft KMS hosts enforce it. If you ever swap to a hardware host you may need to pre-seed activations.
Office LTSC vs Microsoft 365 — can they coexist?
No. The Click-to-Run installer refuses side-by-side. Run
setup.exe /configure Remove.xml with <Remove All="TRUE"/>
first, then install the VL edition.
How does auto-discovery work? Do I need it?
No — the Quick Start one-liner pins the host explicitly so auto-discovery is irrelevant
for internet visitors. It exists for managed corporate networks: the Software Protection
Service queries DNS for _vlmcs._tcp.<primary-dns-suffix>, and if the SRV
resolves, Windows connects there on the returned port. If you want it on your own LAN,
publish a SRV record pointing at {{ .Site.Params.kmsHost }}:{{ .Site.Params.kmsPort }}
(or any vlmcsd you self-host) and set the matching DNS suffix on each client.
Will my activation be logged? What about privacy?
The KMS protocol itself sends your machine's hostname, your client IP (from the TCP socket), and the product ID being activated. The server records the event in a log so the operator can see overall traffic. No personal data beyond what the KMS protocol itself transmits is collected; nothing is shared, sold, or retained beyond the operator's monitoring. If that bothers you, run your own vlmcsd — it's a single binary, the source is on GitHub.
Is this legal? Can I use it for anything?
KMS activates only Volume License (VL) editions of Microsoft software. VL keys are licensed per-organization by Microsoft; using a VL edition without a real VL agreement violates Microsoft's licensing terms. This server exists for personal lab / learning / unsupported-OS-revival use. If you don't have a VL agreement, evaluate Windows + Office through Microsoft's free trial channels instead. The site operator is not responsible for how visitors use the host.
How long does a KMS license last?
180 days. The client tries to renew every 7 days; one successful renewal resets the 180-day clock. As long as a machine reaches the KMS once a quarter it stays activated indefinitely.
Where can I see the GVLKs Microsoft publishes?
Windows: learn.microsoft.com/.../kms-client-activation-keys.
Office / Project / Visio: learn.microsoft.com/.../gvlks.