← Back to Blog

‘slmgr’ Is Not Recognized – The Real Fix (CMD & PowerShell)

KS
KeyStarter Editorial Team
Windows licensing & activation troubleshooting · real buyer tickets + Microsoft docs, re-checked monthly
GUIDE · WINDOWS ACTIVATION
‘slmgr’ Is Not Recognized – The Real Fix (CMD & PowerShell)
Why slmgr.vbs says ‘not recognized’ in PowerShell or recovery mode, the exact copy-paste commands for both shells, and the admin-rights rule people miss.
✓ Microsoft docs verified✓ Built from real buyer tickets✓ Re-checked monthly
YOUR FIX PATH3 STEPS TO DONE

1Open an elevated CMD (right-click → Run as administrator)

2Run cscript //nologo with the full System32 path — copy-paste from section 01

3Verify with /dlv — run /ato only if the check shows a missing key ✓ done

2
copy-paste commands fix every variant
3
shells covered: CMD, PowerShell, WinRE
1
rule: one elevated window for all switches

Quick Answer

Quick answer: “slmgr is not recognized” is a command-path problem, not an activation problem — 2 copy-paste commands below fix every variant.

On this page: The Universal Fix (Works Everywhere) → Per-Shell Notes → The Companion Rule People Miss.

ON THIS PAGE
01 The Universal Fix (Works Everywhere)    02 Per-Shell Notes    03 The Companion Rule People Miss    04 Command quick reference    05 Frequently asked questions    06 External References
Who this is for. ✓ You typed slmgr into CMD or PowerShell and got “not recognized” — including 32-bit PowerShell on 64-bit Windows and recovery/WinRE. ✗ Not for Windows already shows a specific activation error code — the targeted error-code guides cover those..
TL;DR

• slmgr is a VBScript (slmgr.vbs) in C:\Windows\System32 — the error means your shell cannot find or run it.
• Universal fix: cscript //nologo with the full System32 path, in an elevated prompt.
• 32-bit PowerShell on 64-bit Windows → C:\Windows\SysNative\slmgr.vbs; WinRE → reg query checks or boot the full OS first.
• Habit that prevents it: one elevated CMD window for every slmgr management switch.
• Three switches cover 90% of cases: /xpr (expiry/state), /dlv (channel and partial key), /ato (activate now).

TOP PICKS — EDITOR TEAM
Windows 11 Pro OEM key BEST SELLER

Best for: Activation fixes that should end with a clean, permanent license
Check price ↗
Windows 11 Home key

Best for: Home-edition PCs that just need a valid key
Check price ↗
Office 2021 Pro Plus key

Best for: One-time Office purchase, no subscription
Check price ↗
Windows Server IoT 2022

Best for: Appliance and fixed-purpose builds
Check price ↗

Disclosure: links go to KeyStarter products; we may earn from qualifying purchases. Prices are set at checkout.

“slmgr is not recognized” is a command-path problem, not an activation problem. slmgr is a VBScript (slmgr.vbs) living in C:\Windows\System32; the error appears when your shell cannot find or run that script – typically inside a 32-bit PowerShell on a 64-bit Windows (path redirection), inside recovery/WinRE (bare environment, no script host mapping), or from a terminal that is not elevated correctly. Two copy-paste commands below fix every variant.

01The Universal Fix (Works Everywhere)

cscript //nologo C:\Windows\System32\slmgr.vbs /dlv
cscript //nologo C:\Windows\System32\slmgr.vbs /ato

Calling cscript with the full path bypasses PATH, association, and redirection issues in one move. Run it in a Command Prompt opened as Administrator.

Bottom line. calling cscript with the full path bypasses PATH, association and redirection issues in one move.

02Per-Shell Notes

PowerShell (64-bit): slmgr /xpr normally works directly. If it does not, use the cscript form above – PowerShell does not auto-resolve .vbs the way CMD does in every configuration.

PowerShell (32-bit on 64-bit Windows): the shell is redirected to SysWOW64, where slmgr.vbs is absent. Use the native path: C:\Windows\SysNative\slmgr.vbs – SysNative is the alias that reaches the real 64-bit System32.

Recovery Console / WinRE: the bare environment has no script host mapping. Use reg query checks instead, or boot the full OS first – activation commands belong in the running system.

Bottom line. match the shell to the path form — SysNative for 32-bit PowerShell, reg query for WinRE.

03The Companion Rule People Miss

slmgr management switches (/ipk, /ato, /upk, /skms) require an elevated prompt. Without elevation you get a different failure (access denied, 0x80070005) – but mixing a non-elevated window with the not-recognized confusion sends people in circles. Rule: one elevated CMD, cscript + full path, done. All switches and their outputs are documented by Microsoft’s official Slmgr.vbs reference.

Bottom line. one elevated CMD window with cscript + full path ends the not-recognized loop for good.

04Command quick reference

COMMAND QUICK REFERENCE

cscript //nologo C:\Windows\System32\slmgr.vbs /dlv

cscript //nologo C:\Windows\System32\slmgr.vbs /ato

Commands exactly as documented in this guide — run in an elevated prompt. Outputs vary by edition and licence state; the table below maps each command to its job.

How you run it What it gives you
cscript //nologo C:\Windows\System32\slmgr.vbs /dlv Detailed license info — channel and partial key
cscript //nologo C:\Windows\System32\slmgr.vbs /xpr Activation expiry / state
cscript //nologo C:\Windows\System32\slmgr.vbs /ato Activate now
32-bit PowerShell on 64-bit Windows Use C:\Windows\SysNative\slmgr.vbs — the alias that reaches the real 64-bit System32

Bottom line. /dlv, /xpr and /ato cover the checks that matter — everything else is specialist.

05Frequently asked questions

slmgr runs but returns 0x80070005 – is that the same issue?

No – that is the elevation error. Close the window, reopen Command Prompt via right-click “Run as administrator”, and run the same command.

Which slmgr commands matter for activation checks?

Three cover 90% of cases: /xpr (expiry/state), /dlv (channel and partial key), /ato (activate now). Everything else is specialist.

Does fixing the path error require buying anything?

No — the fix is a command Windows already ships. If the licence check afterwards reveals a missing or blocked key instead, a matching edition from our Windows 11 Pro listing resolves it the same day.

Can I check my licence state before spending anything?

Yes — slmgr /dlv and slmgr /xpr show the channel, partial key and licence status for free. Buy a key only when the check itself shows one is missing or blocked.

06External References

Related: all activation failure causes and fixes – and if the checks reveal a missing or blocked license, the 0x803F7001 fix and the 0xC004C003 fix pick up from there.

EXTERNAL REFERENCES
  1. Microsoft Learn: Slmgr.vbs usage (official reference)
  2. Microsoft Learn — activation techniques and slmgr
  3. Microsoft Support — Windows activation errors
  4. Microsoft Learn — licensing and activation troubleshooting
  5. Microsoft Support — Activate Windows
Related reading

Written by the KeyStarter Technical Team — AI-assisted drafting, human-verified against the linked Microsoft documentation. Updated November 04, 2026. Applies to: Windows 10 and Windows 11 client editions; steps re-checked monthly.

Disclosure. KeyStarter is an independent third-party reseller of genuine Microsoft licenses (Windows, Office, Server) and is not affiliated with or endorsed by Microsoft. Product names are trademarks of their respective owners. Prices are set at checkout.