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.
slmgr /xpr
slmgr /dlv
nslookup -type=srv _vlmcs._tcp
slmgr /ato
slmgr /xprgives you the one-line answer on whether the machine is inside a licensed period.slmgr /dlvnames the KMS host it last used, which is often the whole story.- 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. - Check the clock before retrying:
w32tm /resync. A badly skewed clock fails activation on its own and produces a different code. - Re-run
slmgr /dlvand 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.
- Get the device onto a network that can reach the host, whether that is the office LAN or the VPN.
- Force a renewal rather than waiting for the schedule:
slmgr /ato. - Confirm with
slmgr /dlvthat Licence Status reads Licensed and a fresh period is showing. - 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.
- On the current host, run
slmgr /dlvand confirm it holds a host key and reads Licensed. A host whose own activation expired cannot issue anything. - Delete any stale
_vlmcsservice record in DNS, then restart the Software Protection service on the live host so it republishes. - On a test client, run
ipconfig /flushdnsthenslmgr /ato. - Push
slmgr /atoto 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.
- From an affected client, run
Test-NetConnection kms.contoso.local -Port 1688in PowerShell. - If it returns False, check the host firewall rule SPPSVC-In-TCP first, then any ACL between the subnets.
- Check whether an endpoint protection product began filtering outbound connections after a policy update.
- Retry
slmgr /atoonce 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.
- Check the time service:
w32tm.exe /query /status /verbose. - Run
w32tm /resyncand confirm the offset closed. - Correct the date and time by hand if the drift is too large for a resync to be accepted.
- 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.
- Install a Multiple Activation Key instead:
slmgr /ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX. - Activate with
slmgr /ato, then confirm the channel changed withslmgr /dli. - 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 /xproutput 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
slmgr /xprreports the machine as activated rather than expired.slmgr /dlvshows Licence Status: Licensed, and the KMS machine name is the host you expect.- The desktop watermark is gone and personalisation settings are available again.
slmgr /ckmshas been run if you pinned a host to prove the diagnosis.- Come back after a week and re-run
slmgr /dlvto 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.
