
slmgr (the Software Licensing Management Tool, slmgr.vbs) is the built-in command-line tool for checking and managing Windows activation. This guide shows the commands you'll actually use: checking licence status and expiry, the /rearm option for evaluation editions and its limits, activating with a product key, and converting a Windows Server evaluation to a licensed edition. It applies to Windows 10, 11 and Windows Server 2016 to 2025.
Quick answer(Command Prompt as Administrator):
slmgr /dli :: licence status and edition
slmgr /dlv :: detailed info, including remaining rearm count
slmgr /xpr :: when the current activation or evaluation expires
slmgr /ipk <key> :: install a product key, then: slmgr /ato
Check your licence status
| Command | What it shows |
|---|---|
slmgr /dli | Edition, partial product key and licence status |
slmgr /dlv | Detailed info, including Remaining Windows rearm count and Timebased activation expiration |
slmgr /xpr | Whether Windows is permanently activated, or when it expires |
Each command opens a small dialog. To print the output in the console instead, run it through cscript: cscript //nologo %windir%\system32\slmgr.vbs /dlv.
What slmgr /rearm does
slmgr /rearm resets Windows' licensing timer after a restart. It is mainly used with Windows Server evaluation editions, which run for 180 days: rearming starts a new evaluation period so you can keep testing. It doesn't activate Windows, and it can only be used a limited number of times; slmgr /dlv shows how many rearms are left. When the count reaches 0, the command fails and you need a licence.
Evaluation editions are meant for evaluation. A server that runs a business service needs a proper licence, activated as shown below.
Activate Windows with a product key
slmgr /ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX :: install a product key
slmgr /ato :: activate online
slmgr /dli :: confirm "Licensed"
For KMS activation in a company network, point Windows at your KMS host with slmgr /skms kms.example.local and then run slmgr /ato.
Convert Windows Server evaluation to a full edition
You can't enter a retail key directly into an evaluation edition. Convert it with DISM instead (this keeps your roles and data):
DISM /Online /Get-CurrentEdition
DISM /Online /Get-TargetEditions
DISM /Online /Set-Edition:ServerStandard /ProductKey:XXXXX-XXXXX-XXXXX-XXXXX-XXXXX /AcceptEula
The server restarts, sometimes twice. Use ServerDatacenter for the Datacenter edition. Domain controllers can't be converted this way.
Remove a product key
slmgr /upk :: uninstall the current product key
slmgr /cpky :: remove the key from the registry
Do this before moving a retail licence to another machine, or before handing over a server image.
Frequently asked questions
What does slmgr /rearm do?
It resets Windows' licensing timer after a restart, for example to start a new evaluation period on Windows Server. It doesn't activate Windows, and the number of rearms is limited.
How do I see how many rearms are left?
Run slmgr /dlv and read Remaining Windows rearm count.
How do I check how many days are left on Windows Server evaluation?
Run slmgr /dlv and read Timebased activation expiration, or slmgr /xpr for the expiry date.
How do I activate Windows Server from the command line?
Run slmgr /ipk with your product key, then slmgr /ato. For an evaluation edition, convert it with DISM /Set-Edition first.


