A Windows Server2016 is installed, and it always shuts down automatically for no reason. Trying to activate kms failed. I searched some information on the Internet and found that it was related to the installed Evaluation version, so I tried to replace the version.
step:
1. View the local Edition ID
Enter: DISM /online /Get-CurrentEdition
For example, for the evaluation version of the Standard Standard Edition, remove the four letters of Eval from ServerStandardEval to get the Edition ID of the machine.
For example here is ServerStandard.
2. From the Evaluation version to the official version:
输入:DISM /online /Set-Edition:XXXXXX /ProductKey:XXXXX-XXXXX-XXXXX-XXXXX-XXXXX /AcceptEula
You can fill in the version result obtained in the previous step for the Edition ID, and fill in the serial number behind the ProductKey (you can search it yourself online)
If you don't understand the above parameters, you can refer to the following, just copy and run.
Standard Edition: ServerStandard
DISM /online /Set-Edition:ServerStandard /ProductKey:WC2BQ-8NRM3-FDDYY-2BFGV-KHKQY /AcceptEula
Datacenter Edition: ServerDatacenter
DISM /online /Set-Edition:ServerDatacenter /ProductKey:CB7KF-BWN84-R7R2Y-793K2-8XDDG /AcceptEula
After the operation is complete, restart the operating system.
3. This method is also applicable to Standard to DataCenter
For example, to convert the standard version to the Datacenter version, execute the following command:
DISM /online /Set-Edition:ServerDatacenter /ProductKey:XXXXX-XXXXX-XXXXX-XXXXX-XXXXX /AcceptEula
TIPS:
Temporary solution if you do not upgrade:
The following method can temporarily fix the system automatic shutdown problem, but the optimal solution is to activate the system.
Add the following code to a .bat and add it to the system startup item, otherwise the wlms.exe process will reappear after each restart.
taskkill /f /im wlms.exe //这个是关闭wlms.exe
ping -n 4 127.0.0.1 //这个是为了延时
shutdown -a //取消重启
Reference documents: