Windows · Windows Server  ·  medium  ·  Core Windows faults

0xC004F074 — the KMS host could not be contacted

A volume-licensed machine cannot reach a KMS server, or reached one that will not activate it.

What you see

Activation fails with 0xC004F074 and text about the Key Management Service being unavailable. Windows goes into notification mode.

What is actually wrong

Either DNS has no _VLMCS SRV record, the KMS host is unreachable on TCP 1688, the host has not met its activation threshold, or the machine has a KMS client key when it should have a MAK.

Codes and articles

0xC004F0740xC004F0380xC004F050

Fixes (2)

Prove the KMS host is discoverable and reachable
Elevated PowerShell15 minuteslow riskreversible

The machine should be activating against an on-premises KMS host.

  1. Check what the client currently thinks.

    Command Prompt
    cscript C:\Windows\System32\slmgr.vbs /dlv
  2. Look for the SRV record KMS clients use to find the host.

    PowerShell
    Resolve-DnsName -Name _vlmcs._tcp -Type SRV

    If this returns nothing, the client has no way to find a host and everything else is moot. The record is published by the KMS host itself.

  3. Test the port to the host the record named.

    PowerShell
    Test-NetConnection -ComputerName kms.example.local -Port 1688
  4. If DNS is broken but the host is known, point the client at it directly as a temporary measure.

    Command Prompt
    cscript C:\Windows\System32\slmgr.vbs /skms kms.example.local:1688
  5. Activate.

    Command Prompt
    cscript C:\Windows\System32\slmgr.vbs /ato
Confirm it workedslmgr /dli reports Licensed.
Command Prompt
cscript C:\Windows\System32\slmgr.vbs /dli
If you need to undo itClear a manually set host with cscript slmgr.vbs /ckms and let DNS discovery take over again.
Install the MAK key instead
Elevated command prompt10 minuteslow riskreversible

There is no KMS infrastructure and the machine should be using a Multiple Activation Key.

  1. Install the MAK.

    Command Prompt
    cscript C:\Windows\System32\slmgr.vbs /ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
  2. Activate against Microsoft.

    Command Prompt
    cscript C:\Windows\System32\slmgr.vbs /ato
  3. If there is no internet, use phone activation.

    Command Prompt
    slui 4
Confirm it workedslmgr /dli shows Licensed and the description says MAK.
Command Prompt
cscript C:\Windows\System32\slmgr.vbs /dli
If you need to undo itReinstall the KMS client setup key for the edition, published by Microsoft, then re-run /ato.

Where this stops. This write-up was written and checked by hand. It says what each step changes, how to confirm it worked and how to reverse it, and anything destructive is flagged before you reach it. If it does not match what your machine is doing, search the Support Centre for the exact code or message — and when something needs a person, get in touch.