All services

Active Windows By CMD

Microsoft command guide for activating Windows and Office with a valid licence, with copy buttons and status checks.

WINDOWS + OFFICE

Open your terminal as administrator

  1. Open Start and type cmd.
  2. Choose Run as administrator and approve the Windows prompt.
  3. Copy one command at a time, paste it into CMD, press Enter and wait for the result.

Commands do not grant a free licence. Use your own key for the installed edition. Never enter a product key on this website; replace the placeholder only inside CMD.

If the prompt starts with PS, select PowerShell. Commands and copy buttons update to match your selection.

Do not run XXXXX literally. Replace it with your real key in the terminal, or skip the key step if it is already installed.

Activate Windows

For a digital licence, connect to the internet, sign in with the linked Microsoft account and check Activation settings first.

1. Check the licence

Displays licence and edition information.

cscript //nologo "%windir%\system32\slmgr.vbs" /dli

2. Install your key (if needed)

Replace the XXXXX groups with your key only in CMD. It must match the Windows edition.

cscript //nologo "%windir%\system32\slmgr.vbs" /ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX

3. Request activation

Attempts activation of the installed licence. Organization licences may require the authorized corporate network or VPN.

cscript //nologo "%windir%\system32\slmgr.vbs" /ato

4. Verify status

Shows whether activation is permanent or has an expiry date.

cscript //nologo "%windir%\system32\slmgr.vbs" /xpr

Activation settings

Open the Activation troubleshooter if the command fails.

start ms-settings:activation
Official Windows command reference ↗

Download a script

Checks status, requests activation of the installed licence, then checks status again. No product keys or third-party servers are embedded. Run as administrator and read the local confirmation. Office uses the installation path selected above.

CMD: right-click the .cmd file and choose Run as administrator. PowerShell: open PowerShell as administrator and run the .ps1 file; your organization policy may prevent execution. These are Windows scripts, not Bash files.