Skip to content

Est. 2011ยทMicrosoft Partner 7033487ยทDelivery under 3 minยทSupport 7 days a week

Your vault is empty.

License Error 0xC004F009

0xC004F009 and 0xC004F021: KMS Activation Lapsed After 180 Days

11 min read Updated October 5, 2026 Windows Activation & Licensing

Recommended fix

Windows 11 Enterprise

Price range: 19,99 € through 5990,00 €

Fix It Now

Fix it now

Microsoft publishes 0xC004F009 as the Software Protection Service reporting that the grace period expired. On a KMS client that means the machine stopped renewing long enough for its activation to run out. Nothing has been revoked and your key is intact; the device simply has not spoken to a host in a very long time.

Run these on the affected machine, in an elevated Command Prompt, in order

slmgr /xpr
slmgr /dlv
nslookup -type=srv _vlmcs._tcp
slmgr /ato
  1. slmgr /xpr gives you the one-line answer on whether the machine is inside a licensed period. slmgr /dlv names the KMS host it last used, which is often the whole story.
  2. If the service record does not resolve, the client has no host to renew against. Fix discovery, or pin the host to prove it: slmgr /skms kms.contoso.local:1688.
  3. Check the clock before retrying: w32tm /resync. A badly skewed clock fails activation on its own and produces a different code.
  4. Re-run slmgr /dlv and confirm Licence Status reads Licensed with a fresh period showing.

If you pinned a host only to prove where the fault was, run slmgr /ckms afterwards so the client goes back to discovery.

If the machine reactivates, you are done and it costs nothing. If it cannot reach a host at all, the next section covers why and what to do about devices that never will.

Why it happens

A KMS-activated machine does not hold a permanent licence. Microsoft documents KMS activations as valid for 180 days – the activation validity interval – with client computers attempting renewal every seven days by default, and each successful renewal starting the 180 days again. So a machine has to miss a long run of renewal attempts before anything visible happens. By the time you are reading this code, the device has been unable to reach a host for something close to half a year.

Microsoft’s published text for 0xC004F009 is that the grace period expired, and its listed resolution is to contact the Microsoft Licensing Activation Centers. That resolution is aimed at the general case rather than the KMS one; on a KMS client the practical answer is almost always to restore contact with a host, because the entitlement was never in question. 0xC004F021 travels with it and Microsoft publishes no meaning for it, as do 0xC004FC07 and 0x4004FC06.

What happens at expiry is designed to be survivable rather than damaging. Windows moves into a notification state: the machine keeps running, files and applications are untouched, domain membership and network access continue, and servers keep serving. That is why expired machines sit unnoticed for weeks, and why this is rarely the emergency it looks like on the day someone reports it.

The pattern to watch for is a cluster. One laptop expiring is a laptop. Twenty machines expiring in the same fortnight means they all last renewed around the same time, which points at a host that was decommissioned or a network change six months ago rather than at anything that happened this week.

The device has been away from the network longer than the activation lasts

You have this one if A laptop, a seconded machine or an archived virtual machine that has not been on the corporate network for months, while everything in the office is fine.

  1. Get the device onto a network that can reach the host, whether that is the office LAN or the VPN.
  2. Force a renewal rather than waiting for the schedule: slmgr /ato.
  3. Confirm with slmgr /dlv that Licence Status reads Licensed and a fresh period is showing.
  4. If the device will keep living off-network, plan to move it off KMS rather than repeating this every six months.

The host was decommissioned or its own activation lapsed

You have this one if Several machines expire together, and the KMS machine name in slmgr /dlv belongs to a server that no longer exists or no longer answers.

  1. On the current host, run slmgr /dlv and confirm it holds a host key and reads Licensed. A host whose own activation expired cannot issue anything.
  2. Delete any stale _vlmcs service record in DNS, then restart the Software Protection service on the live host so it republishes.
  3. On a test client, run ipconfig /flushdns then slmgr /ato.
  4. Push slmgr /ato to the rest of the estate rather than waiting for the retry schedule to catch up.

TCP 1688 was closed by a network or endpoint change

You have this one if DNS resolves, the host is healthy, and only clients on one subnet or with one security agent are failing.

  1. From an affected client, run Test-NetConnection kms.contoso.local -Port 1688 in PowerShell.
  2. If it returns False, check the host firewall rule SPPSVC-In-TCP first, then any ACL between the subnets.
  3. Check whether an endpoint protection product began filtering outbound connections after a policy update.
  4. Retry slmgr /ato once the path is open.

The clock is far enough out to fail activation on its own

You have this one if A machine restored from an old snapshot, one with a failed hardware clock, or one that has never had a time source.

  1. Check the time service: w32tm.exe /query /status /verbose.
  2. Run w32tm /resync and confirm the offset closed.
  3. Correct the date and time by hand if the drift is too large for a resync to be accepted.
  4. Retry activation with slmgr /ato.

Large clock skew degrades domain authentication as well as activation. If you find it here, check whether someone else is chasing a Kerberos problem on the same machine.

The device should never have been a KMS client

You have this one if A permanently remote worker, a machine in a customer’s building, or a device that touches your network once a year.

  1. Install a Multiple Activation Key instead: slmgr /ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX.
  2. Activate with slmgr /ato, then confirm the channel changed with slmgr /dli.
  3. Remove any pinned host left behind: slmgr /ckms.

Full reference

The intervals this all runs on

Interval Documented value Changed with
Activation validity 180 days Not adjustable on the client
Renewal attempt once activated Every 7 days by default slmgr /sri <minutes> on the host, range 15 minutes to 30 days
Retry while unactivated 2 hours by default slmgr /sai <minutes> on the host, range 15 minutes to 30 days
Host count window Unique connections in the past 30 days Not adjustable
Host count storage The 50 most recent contacts Not adjustable

The spread is what makes this quiet. A machine that renewed last week has months of margin, and a client that cannot reach the host keeps trying on its own schedule the whole time. The failure only becomes visible when the margin is gone, which is why the first symptom is usually a user rather than a monitoring alert.

Commands worth having to hand

Command What it gives you
slmgr /xpr A one-line answer on whether the machine is inside a licensed period. Documented as most useful on KMS clients
slmgr /dlv Licence status, the KMS machine name and port last used, and the remaining period
slmgr /ato Attempts activation or renewal now
slmgr /skms <host>:1688 Pins a host, which is how you prove discovery is the problem
slmgr /ckms Clears the pin and restores discovery
nslookup -type=srv _vlmcs._tcp Shows whether the service record exists and where it points
Test-NetConnection <host> -Port 1688 Tests the path the client needs
w32tm /resync Corrects the clock, which fails activation independently when it drifts

Catching this before it happens

  • Report on slmgr /xpr output through your management tool. It is one line per machine and it turns a six-month silent failure into a weekly number.
  • Watch the count on the host. A count that falls without machines being decommissioned means devices have stopped checking in, which is the same fault seen from the other end.
  • Check the host’s own licence state on a schedule. Everything downstream depends on it and nothing warns you when it lapses.
  • Treat any machine that is off-network for months as a candidate to move off KMS, rather than as a machine to reactivate by hand twice a year.

When the machine cannot come back

Some devices genuinely cannot meet a six-monthly cadence: equipment in a customer’s building, machines on isolated networks, laptops issued to people who never visit an office. For those, reactivating by hand is not a fix, it is a recurring ticket. A permanent activation is the honest answer, and a Multiple Activation Key is the supported way to get one.

Be selective about which machines move. A MAK activation spends a seat from a finite pool and rebuilding the machine spends another, so moving a whole estate off KMS to solve a problem affecting a dozen laptops trades one problem for a more expensive one. Where the devices are domain-joined and simply cannot reach a KMS host, Active Directory-Based Activation is worth checking first: it renews on domain contact and needs no host at all.

What expiry does not do

  • It does not delete anything, block sign-in, or stop applications running.
  • It does not consume or invalidate your key. The same generic volume licence key works the moment a host is reachable again.
  • It does not affect domain membership, network access or file shares.
  • It does not need a support call to Microsoft in the KMS case, whatever the published resolution for the code says in general terms.

When a licence is the actual fix

The free fix is real and worth trying first: reconnect the device, run slmgr /ato, and the activation starts again at 180 days with nothing bought and nothing changed. That stops being realistic for devices that structurally cannot come back on a six-monthly cadence, and for those a permanently activated licence is the honest answer rather than a recurring ticket. Arco supplies Windows 11 Enterprise upgrade licences and the MAK keys issued against them, and will help work out how many of your machines genuinely belong in that category. For a domain-joined estate, ask about Active Directory-Based Activation first – it costs nothing to run and removes the renewal problem entirely.

Every code this article covers

Code What it points at Source
0xC004F009 The Software Protection Service reported that the grace period expired. On a KMS client this follows a long run of failed renewals Microsoft Learn
0xC004F021 Reported alongside the expiry. Microsoft publishes no meaning for it; read it as the same licensed period having closed not published by the vendor
0xC004FC07 Seen on machines in this state. No published meaning; diagnose from the KMS host name and the network path rather than the digits not published by the vendor
0x4004FC06 Appears in the same logs. No published meaning, and no source supports reading anything into its leading digit not published by the vendor

Confirm the fix worked

  1. slmgr /xpr reports the machine as activated rather than expired.
  2. slmgr /dlv shows Licence Status: Licensed, and the KMS machine name is the host you expect.
  3. The desktop watermark is gone and personalisation settings are available again.
  4. slmgr /ckms has been run if you pinned a host to prove the diagnosis.
  5. Come back after a week and re-run slmgr /dlv to confirm the renewal cycle is working, rather than the one manual activation having been a one-off.

Questions people ask about this

Do I lose files or applications when a KMS activation expires?

No. Windows moves into a notification state. Data, installed software, domain membership and network access are unaffected, and everything returns to normal the moment activation succeeds again.

Can the 180 days be extended?

No. The activation validity interval is fixed. What you can change is how reliably renewals happen: a machine that reaches the host once a week never gets near the limit, and the renewal interval itself is set on the host with slmgr /sri.

Does fixing this cost anything?

For a device that can reach your KMS host again, nothing at all. A cost only appears when the device cannot realistically return to the network, or when you have no working host left to reach.

Why did it fail silently for six months?

Because renewal failures are logged rather than shown, and the client keeps retrying quietly on its own schedule. Reporting on slmgr /xpr through your management tool is what turns this into something you catch early.

Several machines expired in the same week. Is that a coincidence?

Almost never. It means they all last renewed at about the same time, which points at a host that was retired or a firewall change roughly six months ago. Find that event and you have found the cause for all of them at once.

Related error codes

Was this article helpful?

Your feedback helps us improve our documentation.

Related articles

License Error 0xC004B001 and 0xC004B100: Activation Server Says the Licence Is Invalid License Error 0x803F8001 and 0x803F8003: No Usable Entitlement for the Signed-In Account License Error 0xC004F050 and 0xC004C001: Windows Says This Product Key Is Invalid Free Fix 0xC004F06C and 0x80072F8F: Clock Skew Is Blocking KMS Activation
โ† Back to Knowledge Base