Overview
This document describes how to activate the operating system in a Windows CVM instance.
Note
This document is intended only for Windows Server public images provided by Tencent Cloud. It is not applicable for custom images or images imported from external sources.
Directions
- Log in to the Windows instance in the standard login method.
- Right-click
in the bottom-left corner of the desktop and select Windows PowerShell (Administrator).
- In the PowerShell window, run the following commands in sequence to activate the operating system.
slmgr /upk
slmgr /ipk <ProductKey>
slmgr /skms kms.tencentyun.com
slmgr /ato
<productkey>
in the slmgr /ipk <productkey>
command should be replaced as follows:
- Windows Server 2008 R2 Enterprise:
489J6-VHDMP-X63PK-3K798-CPX3Y
- Windows Server 2012 R2 Datacenter:
W3GGN-FT8W3-Y4M27-J84CP-Q3VJ9
- Windows Server 2016:
CB7KF-BWN84-R7R2Y-793K2-8XDDG
- Windows Server 2019:
WMDGN-G9PQG-XVVXX-R3X43-63DFG
- Restart the CVM instance as instructed in Restarting Instances for the configuration to take effect.
FAQs
In some scenarios where the Windows operating system is not activated, the system memory of a high-end server will be limited to 2 GB, and the rest of the memory will be restricted in the form of "hardware reserved memory". The reason is that the HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\ProductOptions
registry key is damaged. You can run the following command to determine whether to reactivate the system.
(Get-ItemProperty HKLM:\SYSTEM\CurrentControlSet\Control\ProductOptions\).ProductPolicy.count
- If the returned result is above 10,000, such as 56184, there is no need to reactivate the system.
- If the returned result is "Unactivated value: 1960", refer to the following methods to solve the problem.
- Run the following command to activate the operating system.
slmgr.vbs /ipk <ProductKey>
Note
Replace <productkey>
according to the actual operating system version as detailed in ProductKey.
- After the command is executed, run the
(Get-ItemProperty...
command again for verification. The returned value is 56184. - Restart the CVM instance as instructed in Restarting Instances for the configuration to take effect.
- Run the following command to activate the operating system.
slmgr.vbs /ato
- Run the following command to repair.
slmgr.vbs /rilc
- After the command is executed, run the
(Get-ItemProperty...
command again for verification, and the returned value is still 1960. - Run the following command to activate the operating system.
slmgr.vbs /ato
- Uninstall any MSI program.
- Run the
(Get-ItemProperty...
command again for verification, and the returned value may change. However, after the system is restarted, the memory limit is still 2 GB. - Run the following command to activate the operating system.
slmgr.vbs /ato
Was this page helpful?