If a Windows computer is pointing to an outdated or unauthorized Key Management Service (KMS) server, you may want to clear the saved server address and let the device find the correct one. In most cases, this means clearing the KMS setting on the Windows client—not erasing data from the KMS server itself. The steps below explain how to remove a KMS host setting, verify the change, and handle related Microsoft Office or server-side cleanup safely. Use these instructions only on devices and systems you’re authorized to manage, and make sure your organization has a valid licensing method before changing activation settings.
What Does “Clear KMS Server” Mean?
KMS is a volume-activation method used by some organizations to activate Windows and Microsoft Office on managed devices. A client computer can discover a KMS host through DNS, or an administrator can configure a specific host name and port. If that manually configured address is no longer correct, the client may fail to activate or may contact a server it should no longer use.
People use “clear KMS server” to describe two different tasks:
- Clear the KMS host setting on a client: Remove a manually specified server address so Windows can use DNS-based discovery or another approved activation method.
- Decommission a KMS host: Retire an organization’s activation server and update the related network and licensing configuration.
The first task is usually what you need when troubleshooting an individual PC. Clearing a client setting does not erase the KMS server, remove an organization’s license, or automatically deactivate Windows. It changes where that client looks for activation.
Before You Clear the KMS Host on Windows
Confirm that you’re working on the correct computer and have administrator access. If the device belongs to a workplace or school, check with the IT administrator before changing activation settings. The PC may depend on the organization’s KMS infrastructure to remain activated.
It’s also useful to record the current activation details before making changes. Open Command Prompt or Windows Terminal as an administrator, then run slmgr.vbs /dlv. The Software Licensing dialog displays licensing information, including details that can help an administrator diagnose the device. You can also check the Windows Activation page in Settings.
Keep in mind that KMS activation is designed for qualifying volume-licensed environments. Clearing a host address is not a way to obtain a license or bypass activation requirements. If the computer is meant to use a different activation method, confirm that the organization has configured that method correctly.
How to Clear a KMS Server from a Windows Client
To remove a manually configured KMS host from a Windows client, use the built-in Software Licensing Management Tool. This is commonly called the /ckms command. It clears the custom KMS host name and port stored on that client, allowing Windows to use its default KMS discovery behavior.
- Open the Start menu and search for Command Prompt or Windows Terminal.
- Right-click the result and select Run as administrator.
- Enter
slmgr.vbs /ckmsand press Enter. - Accept the confirmation message if one appears.
- Restart the computer, or allow a short time for the licensing service to recognize the change.
If Windows cannot find the command, specify the full path to the script by running cscript %windir%\system32\slmgr.vbs /ckms in an elevated Command Prompt. On 64-bit Windows, the command above is normally sufficient because Windows handles the system path.
After clearing the saved host, the client will generally attempt to locate a KMS server through DNS when it needs activation. This will only work if the correct KMS service record and network access are available. Clearing a host setting does not create or repair those records.
How to Verify the KMS Setting Was Cleared
Run slmgr.vbs /dlv again from an administrator command prompt. Review the licensing details for an explicitly configured KMS machine name. You can also check the activation status in Settings > System > Activation on Windows 11, or Settings > Update & Security > Activation on Windows 10.
If the device needs to activate immediately, an administrator can try slmgr.vbs /ato. This asks Windows to attempt activation using the available configuration. It does not guarantee success: the PC must have a valid license, reach an appropriate activation service, and meet the relevant requirements. If Windows reports an error, note the error code and share it with your organization’s IT or licensing administrator.
For managed devices, also check that the computer can reach the organization’s network or VPN and that DNS is functioning correctly. A cleared host setting may reveal a network issue that was previously hidden by a manually entered server address.
Remove a KMS Host Setting in Microsoft Office
Microsoft Office volume-licensed installations can have their own KMS host configuration. Clearing the Windows KMS setting does not necessarily clear the Office setting, so check Office separately if only Office activation is failing.
Locate the Office licensing script named ospp.vbs. Its folder depends on the Office version and installation type. Common locations include subfolders beneath Program Files\Microsoft Office or Program Files (x86)\Microsoft Office. Open an administrator Command Prompt, change to the folder containing the script, and run cscript ospp.vbs /remhst.
To review Office activation details, you can use cscript ospp.vbs /dstatus from the same folder. Office versions and installation layouts differ, so if the script is not present or the command returns an error, consult your organization’s Office deployment documentation or Microsoft’s current support guidance. Avoid removing product keys or changing other activation settings unless you understand the effect on the installed license.
Should You Remove the Product Key Too?
Usually, no. Clearing a KMS host address is different from uninstalling a product key. The command slmgr.vbs /upk uninstalls the product key from Windows and can leave the operating system unactivated. The related command slmgr.vbs /cpky removes product-key information from the registry. These commands are not required just to clear a saved KMS server address.
Use product-key removal only as part of an approved deployment, reassignment, or decommissioning procedure. Before running it, confirm that you have a valid replacement activation method and that you understand the impact on the device. If you’re unsure, ask your licensing administrator rather than running additional commands as a troubleshooting experiment.
How to Retire a KMS Host Server Safely
If you mean that you want to remove an actual KMS host from your organization, treat it as an infrastructure change—not as a client-side cleanup. First identify all devices and services that depend on that host, then confirm the replacement activation method and migration plan with your licensing administrator. A host can be serving many clients, so shutting it down without preparation may disrupt activation for managed devices.
KMS clients commonly discover hosts through a DNS service (SRV) record for _vlmcs._tcp, and KMS commonly uses TCP port 1688. An authorized DNS administrator should review and update the relevant records as part of the planned change. Check firewall rules, DNS replication, and any manually configured client addresses as well. Do not delete records from DNS simply because a server is being retired; verify that they refer to the old host and that the replacement is ready.
Follow your organization’s volume-licensing and server-decommissioning procedures to remove or reconfigure the host. Preserve required licensing records, document the change, and validate activation with a small group of test clients before completing a broad migration. Avoid manually deleting licensing-related registry data or trying to reset activation counts. Those actions can cause licensing problems and are not a substitute for a supported decommissioning process.
Common Problems After Clearing a KMS Server
-
Windows still shows the old host: Confirm you ran the command in an elevated terminal and check the device again with
slmgr.vbs /dlv. Also check for management scripts or policies that may reapply the setting. - Windows cannot activate: The client may not have access to the organization’s DNS, network, VPN, or replacement KMS host. Ask IT to verify DNS discovery and connectivity.
-
Office remains unactivated: Office may have a separate KMS configuration. Check its status with
ospp.vbs /dstatusand clear the Office host setting if appropriate. - An error appears after a command: Record the full message or error code. Avoid trying unrelated product-key commands; the error may point to permissions, licensing, or network configuration.
- The device is personally owned: A KMS configuration may have been left behind by a previous organization. Contact the seller, former employer, or an authorized support provider to confirm the device’s licensing status before changing activation information.
Conclusion
For most Windows users, clearing a KMS server means removing a manually configured KMS host from the client. Run slmgr.vbs /ckms in an administrator terminal, then verify the licensing details and activation status. If Office has its own KMS configuration, clear it separately with the appropriate ospp.vbs command.
Remember that clearing a KMS address does not remove a license or repair a missing activation service. If you’re retiring a KMS server, coordinate the change with your licensing, DNS, and IT teams, and migrate dependent devices through an approved process. That approach helps keep Windows and Office activation reliable while avoiding unnecessary changes to product keys or licensing data.
Disclaimer: Articles are written by Humans, AI or Both. Verify Important information.