Summary
This article helps you troubleshoot and resolve error 0x8007232B (DNS name does not exist). This error occurs when you try to activate Windows by using Key Management Services (KMS). This error typically means the KMS client can't locate a valid KMS host by using the automatic discovery process.
The troubleshooting steps in this article walk you through the most common causes, including DNS configuration issues, incorrect KMS host settings, and network connectivity problems. The steps apply to physical computers, on-premises virtual machines (VMs), and Azure VMs.
Symptoms
When you try to activate a Windows system, you see the following error message in Windows Script Host:
**Error: 0x8007232B** DNS name does not exist.
Cause
This error message appears if the Key Management Services (KMS) client can't find the server resource records (SRV RRs) for the KMS host in DNS.
By default, KMS clients locate KMS hosts automatically by querying DNS for a list of servers that published _vlmcs SRV records within the membership zone of the client. DNS returns the list of KMS hosts in a random order. The client picks a KMS host, and tries to establish a session on it. If this attempt succeeds, the client caches the name of the KMS host, and tries to use it for the next renewal attempt. If the attempt fails, the client randomly picks another KMS host. We highly recommend that you use the automatic discovery process.
The most common causes of this issue include the following scenarios:
- Firewall rules or Network Security Group (NSG) rules block DNS resolution.
- The client was configured to use a specific KMS host, but the KMS host name was incorrect or invalid.
- The KMS host didn't publish KMS SRV records to the DNS server that the client uses. Additionally, the DNS server doesn't have a forwarding or recursion path to a DNS server that has the records.
Resolution
Use the following steps to troubleshoot and fix the issue. To get the best results from these procedures, install the PsPing tool on the affected computer. If you have a self-hosted KMS server, install the PSPing tool on that computer also.
You should also be familiar with the slmgr script.
Step 1: Make sure that a KMS host is available, or use the Azure KMS service
To use KMS activation, you must have a KMS host in your environment for the clients to activate against. If your clients are Azure VMs, you can use the Azure KMS service. If you don't have a self-hosted KMS host, and you can't use Azure KMS, use one of the following methods:
- Method 1: Configure a self-hosted KMS server
- Method 2: Use an MAK product key instead of KMS
Method 1: Configure a self-hosted KMS server
If there are no KMS hosts configured in your environment, and you can't use the Azure KMS service, install one. Then, use an appropriate KMS host key to activate it. After you configure a computer on the network to host the KMS software, publish the Domain Name System (DNS) settings.
For information about the KMS host configuration process, see Activate using Key Management Service and Install and Configure VAMT.
After you configure a KMS host, try again to activate. If activation fails and generates the same error as before, go to Step 2.
Method 2: Use an MAK product key instead of KMS
If you can't install a KMS host or, for some other reason, you can't use KMS activation, use an MAK product key. If you downloaded Windows images from Microsoft, the stock keeping units (SKUs) that are associated with the images are generally volume licensed-media, and the product key that's provided for these images is an MAK key.
To use an MAK product key, open an administrative Command Prompt window, and then run the following command:
slmgr -/ipk <xxxxx-xxxxx-xxxxx-xxxxx-xxxxx>
Note:
In this command, <xxxxx-xxxxx-xxxxx-xxxxx-xxxxx> represents your MAK product key.
To try again to activate, run the following command:
cscript c:\windows\system32\slmgr.vbs /ato
If activation fails and generates the same error as before, go to Step 2.
Step 2: Check the client KMS key
-
To verify that the client has the correct KMS client setup key, run the following command at the command prompt:
cscript c:\windows\system32\slmgr.vbs /dlv -
If the product key is incorrect, run the following command to install the correct KMS client setup key:
cscript c:\windows\system32\slmgr.vbs /ipk <kms-client-setup-key> -
After the script finishes, restart the client.
-
To try again to activate, run the following command:
cscript c:\windows\system32\slmgr.vbs /ato
If activation fails and generates the same error as before, go to Step 3.
Step 3: Activate by using a particular KMS host
To bypass the automatic discovery process, you can use the slmgr script to specify a KMS host:
-
Open an administrative Command Prompt window on the client.
-
To clear any existing KMS host setting, run the following command:
cscript c:\windows\system32\slmgr.vbs /ckms -
To specify a KMS host for activation, run the following command:
cscript c:\windows\system32\slmgr.vbs /skms <KMSHost_fqdn>:<KMSHost_Port>[!NOTE]
- In this command, <KMSHost_fqdn> represents the fully qualified domain name (FQDN) of the KMS host, and <KMSHost_Port> represents the port that the KMS host uses.
- To activate an Azure VM by using the Azure KMS service, use
azkms.core.windows.netfor <KMSHost_fqdn>, and use1688for <KMSHost_Port.
-
To try again to activate, run the following command:
cscript c:\windows\system32\slmgr.vbs /ato
If activation fails and generates the same error as before, go to Step 4.
Step 4: Make sure that activation traffic can pass between the client and the KMS host
-
Run the following command at the command prompt on the client:
psping <KMSHost-ip>:1688[!NOTE]
- In this command, <KMSHost_ip> represents the IP address of the KMS host.
- If the client is an Azure VM, and you're using the Azure KMS service for activation, use
20.118.99.224or40.83.235.53for <KMSHost-ip>.
-
If you're using a self-hosted KMS host, open an administrative Command Prompt window on the KMS host, and then run the following command:
psping <KMSClient-ip>:1688[!NOTE]
In this command, <KMSClient_ip> represents the IP address of the client. -
If
pspingfails in either case, follow these steps:-
For an Azure VM, check any network security groups (NSGs) that might affect the VM (such as NSGs that are set at the network interface, subnet, or virtual network level). Make sure that any NSG allows traffic between the VM and the DNS server on UDP/TCP port 53.
-
Make sure that any firewall (including Windows Firewall on the client) allows traffic between the client and the KMS server on UDP/TCP port 1688.
-
To verify that traffic is unblocked, run
pspingagain.
-
-
To try again to activate Windows, run the following command at the command prompt on the client:
cscript c:\windows\system32\slmgr.vbs /ato
If activation fails and generates the same error as before, go to Step 5.
Step 5: Check the DNS configuration
-
To check the DNS configuration, run the following command at the command prompt on the client:
nslookup <KMSHost_fqdn> <intendedDNS_name>[!NOTE]
- In this command, <KMSHost_fqdn> represents the FQDN of the KMS host, and <intendedDNS_name> represents the FQDN or IP address of the DNS server that the client should use to contact the host.
- If the client is an Azure VM that uses the Azure DNS service, use
168-63-129-16for <intendedDNS_name>.
-
If the client is an Azure VM, and you're using the Azure KMS service, and the
nslookupcommand failed, see the following articles to troubleshoot your DNS configuration: -
If you're using a self-hosted KMS host, take one of the following actions:
Step 6 (Self-hosted KMS host only): Check that the KMS host can connect to the DNS infrastructure
-
On the KMS host, open an administrative Command Prompt window, and then run the following command:
ipconfig /allThe output of this command should resemble the following examples:
DNS Servers . . . . . . . . . . . : 168.63.129.16DNS Servers . . . . . . . . . . . : 10.0.3.5 10.0.3.4[!NOTE]
In this example,168.63.129.16is the IP address that Azure VMs use when they connect to the Azure DNS infrastructure. The other IP addresses represent custom DNS servers. -
Verify that each of the DNS server addresses is correct.
[!IMPORTANT]
When you use custom DNS servers for Azure VMs, don't configure the DNS server settings on the VM itself. Specify DNS servers at the level of the network interface or the virtual network. -
If the list of DNS server addresses is empty or doesn't include the correct addresses, see the following articles for more information:
-
If you change any DNS settings, restart the KMS host.
-
After the KMS host restarts, open an administrative Command Prompt window, and then run the following command:
ipconfig /flushdnsThis command flushes and rebuilds the DNS cache.
-
To try again to activate Windows, run the following command at the command prompt on the client:
cscript c:\windows\system32\slmgr.vbs /ato
If the activation fails and generates the same error as before, go to Step 7.
Step 7 (self-hosted KMS host only): Verify that the KMS host is configured to register DNS records
To determine whether the KMS host is registering with DNS, check the registry of the KMS host computer. By default, a KMS host computer dynamically registers a DNS SRV record one time every 24 hours.
Important: This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For protection, back up the registry before you modify it so that you can restore it if a problem occurs. For more information about how to back up and restore the registry, see How to back up and restore the registry in Windows.
To check this setting, follow these steps:
-
Start Registry Editor. To do this, right-click Start > Run, type regedit, and then press Enter.
-
Locate the
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatformsubkey, and check the value of theDisableDnsPublishingentry. This entry has the following possible values:0or undefined (default): The KMS host registers an SRV record one time every 24 hours.1: The KMS host doesn't automatically register SRV records. If your implementation doesn't support dynamic updates, see Manually create a KMS SRV record.
[!NOTE]
Windows Server 2008 and Windows Vista usedSLin the subkey instead ofSoftwareProtectionPlatform. -
If the
DisableDnsPublishingentry is missing, create it (the type is DWORD). If your infrastructure uses dynamic DNS registration, leave the value undefined or set it to0. -
If you want your KMS host to support clients in multiple domains, see Configure the KMS host to publish in multiple DNS domains.
-
If you made any changes to the KMS host configuration, restart the KMS host.
-
To try again to activate Windows, run the following command at the command prompt on the client:
cscript c:\windows\system32\slmgr.vbs /ato
If the activation still fails, contact Microsoft Support.
References
- Troubleshoot Windows activation error codes
- DNS troubleshooting guidance
- Guidelines for troubleshooting DNS-related activation issues
- Troubleshoot Azure Windows virtual machine activation problems
- Troubleshooting tools for Windows activation issues on Azure VMs
- Configure DNS name resolution for Azure virtual networks
- Azure IP address 168.63.129.16 overview
Source: Microsoft Learn / IT Pro troubleshooting by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.
