Since 2016 · 50,000+ customers · ★ 5.0 on Google Live chatWhatsAppTelegramOpen a ticket
Get started
Windows Server

slmgr Commands: How to Check and Reset the Windows License

slmgr commands to check and reset the Windows license guide by 99RDP

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
slmgr commands for Windows licensing: /dlv, /xpr, /rearm, /ipk, /ato
slmgr commands

Check your licence status

CommandWhat it shows
slmgr /dliEdition, partial product key and licence status
slmgr /dlvDetailed info, including Remaining Windows rearm count and Timebased activation expiration
slmgr /xprWhether 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.

Steps to extend a Windows Server evaluation: check rearm count, run slmgr /rearm, restart, check expiry
Extending an evaluation

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.

Steps to convert Windows Server Evaluation to a full edition with DISM
Evaluation to full edition

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.

Minakshi, Server Administrator L1 at 99RDP
Written byMinakshiServer Administrator L1, 99RDP. Part of the team that runs our servers and answers support.
Keep reading

More Windows Server guides

All Windows Server guides

Need a server for this?

✓ Setup in minutes✓ Full admin access✓ 7-day refund on new services