Skip to content

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

Your vault is empty.

License Error 0xC004F074

0xC004F074: the Windows Server hosting Exchange cannot reach a KMS host

11 min read Updated October 5, 2026 Exchange Server

Fix it now

This is the operating system, not Exchange. The Software Protection Service tried to activate against a Key Management Service host and reached none, so the server is running unactivated while mail keeps flowing normally. Every companion code on this page is a DNS failure of one kind or another, so start with the service record rather than with the licence.

Run these on the Exchange host in an elevated Command Prompt, in order

slmgr /dlv
nslookup -type=srv _vlmcs._tcp
Get-DnsClientServerAddress
Test-NetConnection -ComputerName kms.contoso.local -Port 1688
w32tm /resync
  1. Read the nslookup answer. A host name with port 1688 means DNS is doing its job. “Non-existent domain” means the _VLMCS._tcp record is missing from the zone the server is searching.
  2. If nothing resolves at all, check that the adapter has usable DNS servers. On a domain-joined Exchange server those should be your domain controllers, not a public resolver.
  3. If the record resolves but TcpTestSucceeded reads False, TCP 1688 is blocked between this server and the host. That is a firewall conversation, not a licensing one.
  4. If everything above is clean and activation still fails, check the clocks. A difference of more than four hours between client and host is a documented cause, and it surfaces in the activation logs as 0xC004F06C rather than as this code.

Do not run slmgr /rearm on a production Exchange host to buy time. It resets licensing timers, needs a reboot, and can be used only a limited number of times. Rebooting a mail server to postpone a licensing conversation is a poor trade.

If slmgr /dlv reports the licence status as licensed, you are done. If there is no KMS host to reach at all, the next section is about what that actually means.

Why it happens

A volume-licensed Windows Server does not carry a unique key. It installs with a generic volume licence key that is identical on every server of that edition, and that key is an instruction rather than an entitlement: find a Key Management Service host on this network and borrow an activation from it. The server looks for that host by querying DNS for a service record named _VLMCS._tcp, unless an administrator has pinned a host explicitly.

0xC004F074 means that search came back with nothing, and Microsoft publishes it as exactly that: no Key Management Service could be contacted. The companion codes narrow it down, and all three narrow it towards DNS. 0x8007007B is listed in Microsoft’s activation error table as “DNS name does not exist” for KMS clients, which is worth knowing because it looks like a name-parsing error and is not. 0x8007267C is DNS_ERROR_NO_DNS_SERVERS, meaning no DNS servers are configured for the local system, so the query never left the machine.

0xC004F038 is the different one. It means a host was reached and declined, because the count it reports is insufficient. There is a single count of unique machines that have contacted the host, and two thresholds applied to it: Windows Server clients need a count of 5 or higher, Windows client editions need 25 or higher, both including virtual machines. A site with a handful of servers and no desktops can sit under the server threshold indefinitely, which produces a server that will never activate no matter how correct your DNS is.

No KMS service record exists in DNS

You have this one if nslookup -type=srv _vlmcs._tcp reports the record does not exist, and the estate has no obvious KMS host.

  1. Establish whether your organisation has a KMS host at all before assuming the record is missing rather than absent by design.
  2. If a host exists but has not published, restart the Software Protection Platform service on it so it republishes, then confirm the record appears under the _tcp folder of the forward lookup zone.
  3. Check the host’s A record as well. A correct service record pointing at a name whose address is stale fails identically.
  4. Clear the resolver cache on the Exchange host with ipconfig /flushdns before retesting.

The server cannot query DNS at all

You have this one if 0x8007267C, or the lookup fails instantly and the adapter lists no reachable resolver.

  1. Check the adapter with Get-DnsClientServerAddress and confirm it lists resolvers that answer.
  2. On a domain-joined Exchange server those should be your domain controllers.
  3. Correct the configuration and confirm ordinary name resolution works before retesting activation.
  4. Retry with slmgr /ato.

A misconfigured resolver on an Exchange server causes far more than an activation failure. Fix it for its own sake and treat the activation as the symptom that found it.

The host is discoverable but unreachable

You have this one if The service record resolves, but Test-NetConnection on port 1688 returns false.

  1. Confirm the Software Protection Platform service is running on the KMS host.
  2. Enable the inbound firewall rule for the Key Management Service on the host.
  3. Have the network team permit TCP 1688 from the server subnet to the host, and test from the server subnet rather than from the host.
  4. Retry activation once the port test succeeds.

The host’s count is below the threshold

You have this one if 0xC004F038 rather than 0xC004F074: a host answered and refused.

  1. Read the count on the host with slmgr /dli.
  2. Compare it against the thresholds: 5 or higher for Windows Server, 25 or higher for Windows client editions, virtual machines included.
  3. If the estate genuinely cannot reach the threshold, KMS is the wrong mechanism here and individual keys are the practical answer.
  4. If the count should be higher, look for machines deployed from an image that was never generalised, which share one identity between them.

The clocks are more than four hours apart

You have this one if DNS resolves, port 1688 answers, and activation still fails. The activation log carries 0xC004F06C.

  1. Run w32tm /resync on the Exchange host, then retry slmgr /ato.
  2. If it will not resync, read w32tm /query /status and point the server at a source the domain trusts.
  3. Compare the two machines in UTC. Time zone settings on either are irrelevant.

/force is not a parameter of w32tm /resync. Given an unrecognised switch, w32tm prints its usage and exits without resynchronising.

Full reference

The codes and what each one is telling you

Code Published meaning Where to look
0xC004F074 No Key Management Service could be contacted The service record, the port, and the clocks
0xC004F038 The count reported by your KMS is insufficient The host, not this server
0x8007007B DNS name does not exist The _VLMCS._tcp record in the zone this server searches
0x8007267C No DNS servers configured for local system The adapter on this server
0xC004F06C The KMS determined that the request timestamp is invalid The clocks, more than four hours apart

Commands worth knowing on both machines

Command What it does Where
slmgr /dlv Detailed licence status, including the host and port last used This server
slmgr /dli The current count on a KMS host The host
slmgr /skms host:1688 Pins this server to a named host and disables auto-discovery This server
slmgr /ckms Clears the pin and restores DNS auto-discovery This server
slmgr /ato Attempts activation now This server
nslookup -type=srv _vlmcs._tcp Whether the service record is published and where it points This server

Pinning with slmgr /skms hides a broken service record rather than repairing it, and leaves you a server that stops activating the day the host is renamed. It is the right answer for a machine with no DNS domain to search and the wrong first move everywhere else.

Does this affect Exchange?

Not directly. Exchange has its own licensing, entered with its own product key, and it keeps running regardless of what the operating system underneath it thinks about activation. What you have is a production mail server whose operating system is out of compliance, with notification behaviour that will irritate anyone who signs in to the console. That is worth fixing on its own terms, and it is worth fixing before someone decides the desktop watermark is an emergency and reboots the server during business hours.

Where Exchange and Windows versions have to line up

  • Exchange Server SE is supported on Windows Server 2019, Windows Server 2022 and Windows Server 2025.
  • Server Core is the recommended installation option for Exchange Server SE, and Desktop Experience is also supported.
  • Exchange Server 2016 and Exchange Server 2019 reached end of support on 14 October 2025, so an unactivated host is often not the oldest problem on the machine.
  • Check the Exchange version before buying a Windows licence for a host you are about to replace anyway.
  • Evaluation builds of Windows Server cannot always be converted in place to every edition. Check the conversion path before planning a maintenance window around it.

When a licence is the actual fix

If there is no KMS host and no volume agreement behind one, no amount of DNS work fixes this and the server is running unlicensed. A production mail server is not the place to leave that unresolved. Windows Server uses a core-based licensing model, client access licences are required for every user or device accessing the server, and Standard Edition covers two virtual machines plus one Hyper-V host per licence, where Datacenter covers unlimited virtual machines. Windows Server 2025 Standard is the usual fit for a single-purpose server of this kind. We can supply the licence and key, work out the core count you actually need, and confirm that the Windows version you are buying is supported by the Exchange version you are running rather than the one you are about to move to.

Every code this article covers

Code What it points at Source
0xC004F074 The Software Protection Service reported that the computer could not be activated. No Key Management Service could be contacted Microsoft Learn
0xC004F038 A host was reached but the count it reports is insufficient. The thresholds are 5 or higher for Windows Server and 25 or higher for Windows client editions Microsoft Learn
0x8007007B DNS name does not exist. Microsoft lists this in the activation error table as a KMS client DNS failure, not a malformed host name Microsoft Learn
0x8007267C DNS_ERROR_NO_DNS_SERVERS, 9852: no DNS servers are configured for the local system, so the query never left the machine Microsoft Learn

Confirm the fix worked

  1. slmgr /dlv reports the licence status as licensed.
  2. The host name and port shown are the ones you intended, not a stale entry.
  3. nslookup -type=srv _vlmcs._tcp resolves to a host that answers on TCP 1688.
  4. The desktop watermark and activation prompts are gone after a sign-out and sign-in.
  5. The server survives one reboot in a maintenance window and stays activated without intervention.

Questions people ask about this

Does an unactivated host affect Exchange?

Not directly. Exchange has its own licensing and keeps working. What you have is an operating system out of compliance, with notification behaviour that annoys anyone using the console.

What does 0x8007007B actually mean here?

Microsoft lists it in the Windows activation error table as “DNS name does not exist” for KMS clients. It looks like a name-formatting error and is not one, so treat it as a missing service record.

Can I point an Exchange host at a KMS host in another domain?

Yes. Automatic discovery is limited to the server’s own DNS domain, but slmgr /skms accepts any reachable host name or address as long as TCP 1688 is open between them.

How many machines does the KMS host need before it will activate mine?

A count of 5 or higher for Windows Server, or 25 or higher for Windows client editions, counting virtual machines. A small estate with only a few servers can sit below it indefinitely, in which case individual keys are the practical answer.

Do I need client access licences as well as the server licence?

Yes. Microsoft states that CALs are required for every user or device accessing the server. They are a separate purchase from the server licence and both are required.

Related error codes

Was this article helpful?

Your feedback helps us improve our documentation.

Related articles

License Error 550 5.2.1: the mailbox is disabled, blocked or has lost its licence License Error 552 5.2.2 mailbox full: recipient quota and hourly receive limits in Exchange Free Fix Error -550 dirty shutdown: Exchange will not mount a database missing its logs Free Fix TargetUserAlreadyHasPrimaryMailboxException and other stuck move requests
โ† Back to Knowledge Base