Fix it now
These are two different failures on the same path. Microsoft publishes 0x8007007B as “DNS name does not exist”, so the host name you gave the client does not resolve. 0x800706BA is “The RPC server is unavailable”: the name resolved and nothing answered on TCP 1688.
slmgr /dlv
nslookup kms.contoso.local
nslookup -type=srv _vlmcs._tcp
- Read the KMS machine name in the
slmgr /dlvoutput first. It is often not the host you think the client is using. - If the plain
nslookupon that name fails, you have the 0x8007007B case. Fix the record in DNS, or point the client at a name that does resolve withslmgr /skms kms.contoso.local:1688. - If the name resolves, test the port:
Test-NetConnection kms.contoso.local -Port 1688in PowerShell.TcpTestSucceeded : Falseis the 0x800706BA case. - On the host, open the port with
Set-NetFirewallRule -Name SPPSVC-In-TCP -Profile Domain,Private -Enabled Truein an elevated PowerShell session. - Retry with
slmgr /ato, then confirm withslmgr /dlvthat Licence Status reads Licensed.
slmgr /skms switches DNS auto-discovery off on that client. Use it to prove where the fault is, then run slmgr /ckms to hand the client back to discovery once DNS is fixed.
If the client activates you can stop here. If not, the next section explains what each of the two codes is actually reporting and which layer it comes from.
Why it happens
A volume-licensed client has to find a Key Management Service host before it can do anything. By default it asks DNS for a service record called _vlmcs._tcp in its own DNS domain, and connects to whatever that record names on TCP 1688. If someone has pinned a host with slmgr /skms, that name is read from the registry instead and DNS discovery is skipped. Both of these codes come from that sequence, and they come from different points in it.
Microsoft’s activation error list publishes 0x8007007B as “DNS name does not exist”, with a resolution that sends you to the KMS and DNS troubleshooting procedure. That is worth stating plainly, because the same value is Windows error 123 in other contexts, where it means a name is syntactically invalid. In an activation failure it is the resolver reporting that the name it was given does not exist. Correcting a typo does fix it, but only because the corrected name is one DNS can answer for.
0x800706BA is a different layer. Microsoft publishes it as “The RPC server is unavailable”, and gives three things to check: a firewall exception for KMS on TCP 1688, DNS SRV records that point at a valid host, and general network connectivity. KMS runs over anonymous RPC on that port, so a client that has resolved the name and cannot open the socket reports the RPC server as missing rather than the host.
0xC004F056 turns up in the same conversations. Microsoft publishes no meaning for it, so treat it as one more sign the client did not complete an exchange with a host, and diagnose it with the same two tests rather than by the digits.
The name the client is using does not resolve
You have this one if 0x8007007B, and a plain nslookup on the KMS machine name from slmgr /dlv comes back with a non-existent domain.
- Check whether the name has an A record at all, and whether the client is searching the DNS domain that holds it.
- If the host lives in another DNS domain, set that domain on the client with
slmgr /skms-domain contoso.comrather than pinning a host name. - If you need the client working now, pin the host:
slmgr /skms kms.contoso.local:1688, thenslmgr /ato. - Once DNS is right, return the client to discovery with
slmgr /ckmsand retry.
slmgr /skms accepts a fully qualified name, an IPv4 or IPv6 address, or a NetBIOS name. If the name fails and the address works, the fault is DNS and nothing else.
Nothing is listening on TCP 1688 at the other end
You have this one if 0x800706BA, the name resolves, and Test-NetConnection on port 1688 returns False.
- On the host, confirm the Software Protection service is running:
sc query sppsvc. - Confirm something is bound to the port:
netstat -ano | findstr :1688should return a LISTENING line. - If nothing is listening, the machine is not a KMS host yet. Installing the host key and activating it is what starts the service listening.
- Enable the firewall rule Microsoft names for this:
Set-NetFirewallRule -Name SPPSVC-In-TCP -Profile Domain,Private -Enabled True.
Something in the path between the subnets drops 1688
You have this one if The port test succeeds from a machine on the host’s own subnet and fails from the client’s.
- Test from the failing client’s subnet. A test run on the server proves nothing about the path.
- Ask the network team to permit TCP 1688 from the client subnets to the host.
- Check whether an endpoint protection product on the client started filtering outbound connections after a policy change.
The host was moved to a non-default port
You have this one if Everything checks out on 1688 and nothing answers, because the host is not on 1688.
- On the host, read the listening port from
slmgr /dlv. - Point the client at it:
slmgr /skms kms.contoso.local:<port>. - Update the SRV record so discovery hands out the right port, then clear the pin with
slmgr /ckms.
slmgr /sprt changes the port on the host. Every client and the SRV record have to follow, which is why the default is worth keeping unless you have a reason.
Full reference
What each command in this article is for
| Command | What it does | Where to run it |
|---|---|---|
slmgr /dlv |
Detailed licence status, including the KMS machine name and port last used | Client or host |
slmgr /skms <Name[:Port]> |
Pins the client to a named host and disables auto-discovery | Client |
slmgr /skms-domain <FQDN> |
Sets the DNS domain the client searches for the service record, without pinning a host | Client |
slmgr /ckms |
Clears the pinned host and restores auto-discovery | Client |
slmgr /sprt <Port> |
Changes the port the host listens on. Default is TCP 1688 | Host |
slmgr /ato |
Attempts activation now | Client |
nslookup -type=srv _vlmcs._tcp |
Shows whether the service record is published and where it points | Client |
Test-NetConnection <host> -Port 1688 |
Tests the path Microsoft names in its resolution for 0x800706BA | Client |
Set-NetFirewallRule -Name SPPSVC-In-TCP |
Enables the firewall rule Microsoft names for a KMS host | Host |
The firewall rule is SPPSVC-In-TCP. Microsoft’s own article on creating a KMS host enables it with Set-NetFirewallRule -Name SPPSVC-In-TCP -Profile Domain,Private -Enabled True, which is more reliable than hunting for a display name that varies between Windows versions.
Reading the path in order rather than guessing
Each step below either succeeds or names the layer that is broken. Working through them takes about two minutes and is faster than changing settings and retrying.
| Step | Command | What a failure tells you |
|---|---|---|
| Find out which host the client is using | slmgr /dlv |
A name you do not recognise means a stale pin or a stale SRV record |
| Resolve the name | nslookup kms.contoso.local |
This is the 0x8007007B case. Fix DNS, or use an address to prove it |
| Find the service record | nslookup -type=srv _vlmcs._tcp |
No record means discovery has nothing to find, or the client is searching the wrong domain |
| Reach the port | Test-NetConnection kms.contoso.local -Port 1688 |
This is the 0x800706BA case: firewall, or the host is not listening |
| Confirm the host is listening | netstat -ano | findstr :1688 |
No LISTENING line means the host key was never installed or activated |
| Retry activation | slmgr /ato |
A different code here is more useful than the one you started with |
Clients that live in another DNS domain
A KMS host publishes its service record into its own DNS domain. In a multi-domain forest, or where a machine’s primary DNS suffix does not match the domain holding the record, discovery finds nothing and the client reports a DNS failure. There are two supported answers and they suit different situations.
- On the client,
slmgr /skms-domain <FQDN>sets the DNS domain to search for the service record. Discovery still happens; it just happens somewhere else. Microsoft documents this for disjoint namespaces, and it is overridden if a specific host is also set withslmgr /skms. - On the host, the multi-string value
DnsDomainPublishListunderHKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatformlists extra DNS domain suffixes, and the host publishes its record into each. Restart the Software Protection service afterwards; the restart is what writes the records. DisableDnsPublishingin the same key controls whether the host registers at all. 0 or absent means it registers every 24 hours; 1 means it never does.
Neither code is about your entitlement
Nothing here says anything about your product key. No key is exhausted, blocked, expired or wrong, and no licence needs buying to clear either code. Both are faults in your own network: one in a name that does not resolve, one in a port that does not answer. If you are seeing 0xC004C003, 0xC004C020 or one of the 0xC004F0-range refusals instead, you are looking at a different class of problem and this article will not help.
When the port opens and activation still fails
- Compare the clocks. Microsoft names a difference of more than four hours between client and KMS host as a cause of activation failure, and nothing in these two codes points at it.
- Check the client’s Application log for Event ID 12288 and 12289. A 12288 with no 12289 after it means the request left and nothing came back.
- On the host, look in the Key Management Service log for Event ID 12290, which records each client that reaches it.
- Confirm the client is actually a KMS client.
slmgr /dlvshould describe it as a volume client. A machine carrying a MAK or a retail key never talks to a host at all. - Confirm the host has met its count. A host below the threshold answers the connection and then refuses, which looks nothing like either of these codes but is often the next thing you hit.
Every code this article covers
| Code | What it points at | Source |
|---|---|---|
0x8007007B |
DNS name does not exist. Microsoft’s resolution is the KMS and DNS troubleshooting procedure, not a correction to the syntax of what you typed | Microsoft Learn |
0x800706BA |
The RPC server is unavailable. Documented checks are a firewall exception for TCP 1688, valid SRV records, and network connectivity | Microsoft Learn |
0xC004F056 |
Seen alongside failed KMS exchanges. Read it as the client not completing an exchange with a host, and diagnose it with the same name and port tests | not published by the vendor |
Confirm the fix worked
slmgr /dlvon the client reports Licence Status: Licensed.- The KMS machine name and port in that output are the host you intended.
Test-NetConnection <host> -Port 1688returns TcpTestSucceeded True from the client’s own subnet.slmgr /ckmshas been run if you pinned a host only to prove where the fault was, and the client still activates afterwards.- A second client on the same subnet activates without being pinned, which is what proves discovery works rather than one machine.
Questions people ask about this
Should I use the IP address instead of the host name?
As a diagnostic, yes. slmgr /skms accepts a fully qualified name, an IPv4 or IPv6 address, or a NetBIOS name. If the address works and the name does not, you have isolated the fault to DNS in one command. Leave the estate on names, though: an address in an image is a problem waiting for the day the host moves.
Do I have to reboot after slmgr /skms?
No. The setting takes effect immediately, so run slmgr /ato straight afterwards.
How do I undo a wrong /skms entry?
slmgr /ckms. It removes the host name, address and port from the registry and restores automatic discovery.
Is port 1688 configurable?
Yes, with slmgr /sprt on the host, and the default is TCP 1688. There is rarely a good reason to move it, because every client and every SRV record then has to carry the new port, and the next person to troubleshoot will assume 1688.
Does either code mean I need to buy something?
No. Both are configuration faults on your own network. Your key and your entitlement are untouched, and no purchase changes a name that does not resolve or a port that is closed.
