The following instructions are aimed at administrators and IT representatives and are intended for troubleshooting activation problems in Windows and Office. To be able to follow the instructions in this guide, you should be familiar with the command line (cmd) and / or Powershell (PS). In addition, you must be able to execute the commands described in a shell with admin rights (execute cmd or PowerShell as admin).
In the event of activation errors, the general instructions should be checked first.
In the case of activation problems, there is often a problem with the automatic identification of the KMS server. You should therefore also check the DNS configuration or KMS target server configuration. (see section The automatic search for a KMS server fails. What alternatives are there?)
In addition to the service portal, we recommend the RHRZ WDS and the SCCM as a source for Windows and Office installations, as these media/installations are already correctly preconfigured for KMS activation.
What tools are available to me?
All commands described below can be executed within cmd or PS and require (to make a change to the activation configuration) execution with admin rights.
slmgr.vbs
- Interface for Windows activation
- Can be executed from any directory with the shell used (system component)
- Call: slmgr[PARAMETER]
ospp.vbs
- Interface for Office activation
- Execution only possible within the Office installation directory with the shell used(first navigate to the correct directory with CD)
- (64-bit Office) C:\Program Files\Microsoft Office\Office16
- (32-bit Office) C:\Program Files (x86)\Microsoft Office\Office16
- Call: cscript ospp.vbs [PARAMETER]
slui.exe
- Windows activation dialog
- Can be used to resolve hex error codes to error messages
- Call: slui 0x2a [HEX_ERROR_CODE]
Windows
- The command is: slmgr /dlv
The following information is of particular importance and allows a more precise insight into the current activation status:
- Current activation channel, current licensing status and the last 5 characters of the product key currently in use (marked red in Fig.)
- Time intervals in the activation process and remaining activation duration (marked yellow in the illustration)
- Responsible KMS server and DNS information (in case of successful activation) (marked green in illus.)
In the event of activation problems, corresponding error information (error code in hex) is displayed for troubleshooting purposes.
Once it has been ensured that the correct licensing channel is being used, the error code in question enables further analysis. A web search for the specified error code and the Microsoft documentation can be useful for further error analysis.
Alternatively, it is possible to translate the code to the corresponding text message. To do this, use the command slui 0x2a [ERROR_CODE]
- Example: slui 0x2a 0xC004F056
The activation command slmgr /ato can provide further error descriptions and codes.
Office
- cd "C:\Program Files\Microsoft Office\Office16"
- The command is: cscript ospp.vbs /dstatus
The following information is of particular importance and allows a more precise insight into the current activation status
- Current activation channel, current licensing status and the last 5 characters of the product key currently in use (marked red in Fig.)
- Time intervals in the activation process and remaining activation duration (marked yellow in the illustration)
- Responsible KMS server and DNS information (in case of successful activation) (marked green in illus.)
In the event of activation problems, corresponding error information (error code in hex & error message) is displayed for troubleshooting purposes.
Once it has been ensured that the correct licensing channel is being used, the error code in question enables further analysis. A web search for the specified error code and the Microsoft documentation can be useful for further error analysis
- https://docs.microsoft.com/de-de/office/troubleshoot/activation/office-activation-process-issues
- https://docs.microsoft.com/de-de/windows-server/get-started/activation-error-codes )
Alternatively, it is possible to translate the code to the corresponding text message. To do this, use the commands slui 0x2a [ERROR_CODE] or cscript ospp.vbs /ddescr:[ERROR_CODE]
- Example: slui 0x2a 0xC004F056 or cscript ospp.vbs /ddescr:0xC004F056
The activation command cscript ospp.vbs /act can provide further error descriptions and codes.
Which product key do I need for activation via KMS?
For activation via KMS, a so-called Generic Volume License Key (GVLK) is required, which configures the locally installed Windows or Office instance as a KMS client.
The required GVLK depends on the product to be activated and can be found in the Microsoft documentation.
- Uninstall product key of an Office product (necessary if conflicting licenses or keys of older Office products are present on the system).
- The last 5 digits of the product key to be uninstalled can be determined via cscript ospp.vbs /dstatus
- cscript ospp.vbs /unpkey:[Last_5_ProductKey_Characters]
- Example: Uninstall Office 2016 Pro Plus GVLK: cscript ospp.vbs /unpkey:WFG99
How can I activate Windows or Office manually?
A "manual" activation is useful after error corrections or configuration changes (product key, DNS settings [...]).
If activation is successful, a corresponding message appears. If there is an activation error, the corresponding error message appears(see above)
If Windows or Office have already been activated via KMS in the past, the activation will be renewed.
The automatic search for a KMS server fails. What alternatives are there?
Activation via KMS always requires a KMS server. Normally, the target server is determined via DNS (SRV records) and then contacted.
If the DNS client configuration is incomplete or inappropriate, this process may fail, meaning that activation via KMS is not possible. There are various correction options.
The RHRZ operates two equivalent KMS servers:
- kms01.uni-kl.de | 131.246.125.130
- kms02.uni-kl.de | 131.246.125.145
The port used for KMS is TCP:1688.
The DNS zone with the KMS SRV records is uni-kl.de. Devices that know the suffix of this zone (uni-kl.de) can identify the KMS servers via an SRV record lookup.
Office
- cd "C:\Program Files\Microsoft Office\Office16"
- The commands are cscript ospp.vbs /sethst:[KMS_Server] & cscript ospp.vbs /setprt:1688
- cscript ospp.vbs /sethst:kms01.uni-kl.de or cscript ospp.vbs /sethst:kms02.uni-kl.de
- cscript ospp.vbs /setprt:1688
- Activation afterwards with cscript ospp.vbs /act
- Check the activation status with cscript /ospp.vbs /dstatus
This setting can be canceled with cscript ospp.vbs /remhst
Alternative 2: Set KMS search domain manually
It is possible to specify the DNS search domain for the automatic identification of the KMS target server. In this way, both KMS servers of the RHRZ can be used (depending on availability), as the client automatically selects and contacts a server. However, if a KMS server has already been specified manually, this setting has no further effect.
Office
- cd "C:\Program Files\Microsoft Office\Office16"
- The command is cscript ospp.vbs /skms-domain:[Domain]
- cscript ospp.vbs /skms-domain:uni-kl.de
- Activation afterwards with cscript ospp.vbs /act
- Check the activation status with cscript /ospp.vbs /dstatus
This setting can be canceled with cscript ospp.vbs /ckms-domain.
Alternative 3: DNS settings: Set DNS suffix list manually
For the automatic identification of the target KMS server via DNS, the DNS zone uni-kl.de must be known on the client. The DNS suffix list in the system can be adjusted manually for this purpose
Note:
Depending on the network configuration, the suffix "uni-kl.de" may already be available as a connection-specific suffix via a DHCP lease. Alternatively, the suffix can be automatically configured by the system as the primary DNS suffix during a domain join in the RHRZ AD domain. (If the value is not subsequently changed manually).
In the default configuration, the system will include both connection-specific and the primary DNS suffix in the DNS suffix list. (Which is used to identify the KMS target server)
The DNS suffix search list can therefore be defined manually if the automatically generated list does not lead to the target.
This is a system-wide setting that can affect all network-based functions in the system. Positive side effects on other functions are therefore conceivable if configured correctly.
The DNS suffix search list can be set manually in the network adapter settings .
As the system can have more than one adapter, it is recommended to make this setting on the primary adapter (with connection to the university network/internet).
To do this, open the list of network connections in the Control Panel
- Control Panel => Network and Sharing Center => Change adapter settings
- Alternatively: execute ncpal.cpl
Then open the properties of your primary network adapter.
Activate the manual search list by clicking on "Append these DNS suffixes (in order)".
Use the "Add" button to add all the required suffixes and sort them in descending order. The result should look like this:
- Area-specific suffix (e.g. mv.uni-kl.de)
- rhrk.uni-kl.de
- uni-kl.de
Finally, confirm all changes by clicking on "OK".
As this is a system-wide setting, this configuration affects all network connections.
How can I synchronize the time and date on my system with a time server via the network?
The activation process via KMS only allows slight deviations in date and time between server and client. It must therefore be ensured that the date and time on the client are correct.
For this purpose, synchronization can take place via the network with a time server (NTP server). Synchronization can be carried out with the NTP server of the TU or the RHRZ.
The w32time "Windows timer" service may need to be activated and started beforehand. The services snapin of the system administration (services.msc) can be used for this. Alternatively, Powershell can be used for this.(set-service w32time -StartType Automatic and start-service w32time)