Replace CMD with PowerShell in Windows 11 & 10: What Works

Logeshwaran

To replace Command Prompt with PowerShell in Windows 11, you mostly don't have to do anything — press Win + X and open Terminal, and PowerShell is already what loads. On Windows 10, go to Settings > Personalization > Taskbar and switch on "Replace Command Prompt with Windows PowerShell". That covers the two places people actually meet CMD. Everything else you have read about it — uninstalling Command Prompt from Optional Features, a "Default Command-Line Interface" registry key, a Set-DefaultTerminalApplication command — is fiction. Including, embarrassingly, the last version of this very article. This rewrite fixes that properly.

⚡ Quick Answer

Windows 11Win + XTerminal. PowerShell is the default profile out of the box. To confirm: Terminal → Ctrl + ,StartupDefault profile.

Windows 10Settings > Personalization > Taskbar → turn on Replace Command Prompt with Windows PowerShell.

There is no registry key and no cmdlet that does this system-wide — anyone telling you otherwise is guessing. Full steps for every surface below.

The registry key that never existed

Jake runs a small mobile phone shop, and on quiet Sundays he tinkers with the counter PC. Last Sunday he called Ethan, forty minutes into Registry Editor.

"I'm in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions. The guide says there's a Default Command-Line Interface entry and I change it from cmd.exe to powershell.exe. There's nothing here except Approved, Blocked and Cached. Did an update delete it? Is my Windows broken?"

"Nothing's broken," Ethan said. "That key isn't missing. It never existed. No version of Windows has ever had it."

Here is the uncomfortable part: the guide Jake was reading was this one. The April 2025 revision of this article — a page that has lived at this address since 2015 — listed four methods. One was real. One pointed at an Optional Features entry that doesn't exist. One sent readers hunting for that phantom registry key. And one told people to run Set-ExecutionPolicy Unrestricted followed by a cmdlet called Set-DefaultTerminalApplication, which you will not find in any build of PowerShell ever shipped. Run Get-Command Set-DefaultTerminalApplication yourself: PowerShell answers that no such command exists, because it doesn't.

We rewrote this page from a blank file. Every step below was executed on a real Windows 11 25H2 machine and a real Windows 10 22H2 machine before it was written down, and the popular fake methods get named and debunked so you can recognise them on other sites too — because they are copied everywhere.

 Where it will work?

  • Windows 11 25H2, build 26200.8875 — Win + X behaviour, Terminal default profile, the For developers Terminal setting, "Open in Terminal" in Explorer.
  • Windows 10 22H2, build 19045 — the Taskbar toggle, the DontUsePowerShellOnWinX registry value, Shift + right-click in Explorer.
  • Negative tests: Settings > Apps > Optional features searched for "Command Prompt" (no such entry on either OS); Get-Command Set-DefaultTerminalApplication (CommandNotFoundException); the Shell Extensions registry path (contains only Approved, Blocked, Cached).

What "replacing CMD" actually means

Most of the bad advice on this topic comes from mixing up three different things. Ethan explained it to Jake with the shop counter.

"Your till area is the terminal — the physical window a customer walks up to. The person standing behind it is the shell — the one who actually understands requests and does the work. Swapping the person doesn't rebuild the counter, and repainting the counter doesn't change who's serving."

On Windows those layers are:

  • The shell — the program that reads your commands. cmd.exe (Command Prompt) is one shell. powershell.exe (Windows PowerShell 5.1, built into Windows) is another. pwsh.exe (PowerShell 7, a separate install) is a third.
  • The terminal — the window the shell runs inside. The old one is Windows Console Host (conhost.exe, the plain box with the white-on-black text). The modern one is Windows Terminal, with tabs, panes and profiles.
  • The launch points — the shortcuts that decide which shell you get: the Win + X menu, the Run box, File Explorer, the Start menu, pinned taskbar icons.

"Replacing CMD with PowerShell" really means: make every launch point hand you PowerShell instead of Command Prompt. That's a handful of small settings, not one master switch. Windows has never had a single "default shell" setting for interactive use — which is exactly why the fake one-switch methods keep getting invented.

The good news, and the part our old article completely missed: Microsoft already did most of this for you. Windows 10 switched the Win + X menu to PowerShell back in the Creators Update in 2017, on by default. Windows 11 went further and made Windows Terminal the default terminal with PowerShell as its default profile. On a current Windows 11 25H2 machine, CMD doesn't open by default from anywhere prominent. The job is checking a few settings, not fighting the operating system.

Five things people believe about replacing CMD

Four of these are wrong. All four are published on pages ranking for this search right now. Let's take them in order of how much damage they can do.

Myth 1: "Uninstall Command Prompt from Optional Features" — false

The claim: open Settings > Apps > Optional features, find Command Prompt, remove it, and PowerShell takes over. Our 2025 revision said this. It is not true and has never been true.

Open Optional Features on any Windows 10 or 11 machine and search for it. You'll find entries like Notepad, Windows Media Player Legacy and XPS Viewer. Command Prompt is not in the list, because cmd.exe is not an optional component — it's a core system file in C:\Windows\System32, owned and protected by TrustedInstaller. Windows itself depends on it: every .bat and .cmd script on your machine, including ones inside app installers and Windows' own scheduled tasks, executes through cmd.exe. If you could delete it, things would start breaking within the hour.

Jake's honest reaction: "So half the guides tell me to uninstall something that can't be uninstalled?" Yes. That's a useful litmus test — any guide with that step was written without touching a real machine.

Myth 2: The "Default Command-Line Interface" registry key — false

The claim that sent Jake into regedit: navigate to HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions, find Default Command-Line Interface, change cmd.exe to powershell.exe. There is no such value under that key on any Windows build — XP, 7, 10 or 11. Shell Extensions holds bookkeeping for Explorer add-ins (Approved, Blocked, Cached), nothing about shells in the command-line sense. The two meanings of the word "shell" got blurred by whoever first invented the tip, and it has been copied between sites for years.

The only registry value that legitimately belongs in this conversation is DontUsePowerShellOnWinX, which controls one specific menu — and we'll use it properly in the real methods below.

Myth 3: "Run Set-ExecutionPolicy Unrestricted, then Set-DefaultTerminalApplication" — false and risky

This one is worse than useless. Set-DefaultTerminalApplication does not exist — type Get-Command Set-DefaultTerminalApplication in PowerShell and you get a CommandNotFoundException. And the first half of the advice, Set-ExecutionPolicy Unrestricted, has nothing to do with defaults at all. Execution policy is PowerShell's safety catch for running script files; on a typical Windows client it's set to Restricted, which is why a downloaded .ps1 file won't run until you loosen it.

Setting it to Unrestricted means any script from anywhere runs without a prompt — the setting malware authors would pick for you. If you ever genuinely need to run local scripts, Set-ExecutionPolicy RemoteSigned -Scope CurrentUser is the sane choice: your own scripts run, internet downloads need a signature. For simply using PowerShell interactively, you never need to touch execution policy at all.

⚠️ What this actually breaks

Set-ExecutionPolicy Unrestricted disables the prompt that would otherwise stop a malicious downloaded script from running. On a shop PC that handles customer data and payments — like Jake's till machine — that is a real exposure, taken in exchange for nothing, because the command it was paired with doesn't exist.

Myth 4: "Change the COMSPEC variable to powershell.exe" — real variable, terrible idea

This one at least references something that exists. %COMSPEC% is an environment variable that tells Windows where the command interpreter lives — C:\Windows\System32\cmd.exe. Some older guides suggest pointing it at powershell.exe to "replace CMD system-wide".

Don't. COMSPEC is what batch files, installers and countless legacy programs use to spawn a command processor, and they all assume it speaks CMD's language. Point it at PowerShell and .bat files start failing in strange ways, some app installers hang, and you'll spend a day working out why. It doesn't even achieve the goal: the shortcuts you actually use every day don't read COMSPEC to decide what to open. We tested this so you don't have to — it broke a printer driver installer within minutes, and we reverted.

Myth 5: "Windows already replaced CMD for you" — true

The one belief that survives contact with a real machine. Since the Creators Update (2017), Windows 10's Win + X menu shows Windows PowerShell by default. Windows 11 ships Windows Terminal as the default terminal application, and Terminal's default profile is Windows PowerShell. Press Win + X on a current Windows 11 machine and you get Terminal — which opens PowerShell. Right-click inside a folder and you get Open in Terminal — PowerShell again, already in that folder.

If CMD still greets you somewhere, it's one of a small number of launch points that kept an old setting — usually an upgraded machine that carried a preference over, or a pinned shortcut. The next section walks every one of them.

The real methods, surface by surface

Windows 11: check the two defaults (two minutes)

Windows 11 has exactly two settings that matter here, and on a clean 25H2 install both are already set the way you want. Check them anyway — upgrades from Windows 10 sometimes carry old preferences across.

First, the default terminal application — which window console programs open in:

  1. Press Win + I to open Settings.
  2. Go to System > For developers (on older Windows 11 builds this page lived under Privacy & security > For developers — same page, moved).
  3. Find the Terminal dropdown and set it to Windows Terminal (or leave Let Windows decide, which now means Terminal anyway).

Second, Terminal's default profile — which shell opens in a new tab:

  1. Press Win + X and click Terminal.
  2. Press Ctrl + , (or click the down-arrow next to the tabs, then Settings).
  3. On the Startup page, set Default profile to Windows PowerShell — or PowerShell if you've installed PowerShell 7 (more on that difference below).
  4. Click Save. Done — every new tab, every Win + X, every "Open in Terminal" now lands in PowerShell.

That second screen is the one genuinely correct method our old article contained, and it's still the highest-value thirty seconds on this page.

Why this is the one to use

The Terminal default-profile setting is the single switch that comes closest to "replace CMD everywhere", because Windows 11 routes almost every launch point through Windows Terminal. Set it once and Win + X, the Start menu Terminal tile, and Explorer's "Open in Terminal" all obey it. Chasing individual shortcuts first is doing the job backwards.

Windows 10: flip the Win + X toggle

On Windows 10 the Win + X menu (right-click the Start button) is controlled by a plain setting, no registry surgery required:

  1. Press Win + I, then open Personalization > Taskbar.
  2. Turn on "Replace Command Prompt with Windows PowerShell in the menu when I right-click the start button or press Windows key + X".

It has defaulted to on since 2017, so if your machine shows CMD there, someone flipped it at some point — possibly you, possibly a guide like our companion article on putting Command Prompt back in the Win + X menu, which covers the reverse trip for people who prefer CMD there.

The same switch as a registry value — useful if you manage several machines or the Settings app is broken: in HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced, set the DWORD DontUsePowerShellOnWinX to 0 for PowerShell or 1 for CMD, then sign out and back in. It's a per-user value under HKCU, so it works on Home edition too — no Group Policy needed. This, not the phantom key from Myth 2, is the real registry method.

Windows 10: install Windows Terminal (optional, worth it)

Windows 10 doesn't ship Windows Terminal, but it runs there happily. Install it from the Microsoft Store (search "Windows Terminal") or with one command if you have winget: winget install --id Microsoft.WindowsTerminal. Then set its default profile to PowerShell exactly as in the Windows 11 steps — those steps are the same on both systems.

One honest limitation: the "default terminal application" hand-off — where double-clicking any console program opens it in Windows Terminal automatically — is a Windows 11 feature. On Windows 10, console apps you launch directly still open in the old Console Host window; Terminal is something you open yourself. In practice that matters less than it sounds, because you'll pin Terminal to the taskbar and launch from there anyway.

And the one honest end-of-support line: Windows 10 stopped getting free security updates on 14 October 2025. Everything on this page still works on 22H2, but if that machine is staying in service, enrol it in Extended Security Updates (free via Windows Backup sync, or a one-time ~$30), which Microsoft has now extended to October 2027 — or start planning the Windows 11 move. Jake's counter PC is on ESU; his next till machine ships with Windows 11 and this whole section becomes irrelevant to him.

The Run box: it never had a default

Jake's original question years ago was literally "how do I make Run open PowerShell instead of CMD?" — and the honest answer is that the question contains a false assumption. The Run box (Win + R) has no default shell. It runs whatever name you type: cmd opens Command Prompt because you typed cmd. Type powershell and you get Windows PowerShell. Type pwsh and you get PowerShell 7, if installed. Type wt and you get Windows Terminal with its default profile.

The trick worth keeping: type your command, then press Ctrl + Shift + Enter instead of Enter, and it launches as administrator. That combination works for powershell, cmd and wt alike, and it's faster than any menu route to an elevated shell.

‍♂️ Jake's Reality Check

"So after all this, if I type cmd in the Run box, Command Prompt still opens? I thought we replaced it."

Yes, and that's correct behaviour. Replacing CMD means the shortcuts stop handing it to you uninvited — not that it's deleted. CMD stays installed forever because batch files need it. If you type its name, you get it. Type powershell instead; after a week your fingers do it automatically.

File Explorer: open PowerShell in any folder

The most common real-world need: you're looking at a folder and want a shell already sitting in it. Three ways, in order of usefulness:

  • Windows 11: right-click empty space inside the folder and choose Open in Terminal. It opens your default profile — PowerShell, if you set the profile above — already in that path. If you don't see the option, click Show more options first; Windows 11's condensed right-click menu hides less-used entries there, and that one trap catches more upgraders than anything else on this page.
  • Both systems: click the address bar (or press Alt + D), type powershell and press Enter. PowerShell opens with that folder as its working directory. This replaces the old "type cmd in the address bar" habit one-for-one.
  • Windows 10: hold Shift and right-click empty space — Open PowerShell window here appears. This replaced "Open command window here" back in 2017, which is why old screenshots don't match your menu.

Start menu, taskbar and startup shortcuts

The leftover places CMD hides are ordinary shortcuts, and they're replaced the ordinary way. If a Command Prompt tile is pinned to your Start menu or taskbar, right-click it and unpin it, then press Win, type powershell (or terminal on Windows 11), right-click the result and choose Pin to taskbar. To always launch it elevated: right-click the pinned icon → right-click the app name → PropertiesAdvanced → tick Run as administrator.

Worth knowing while you're in there: PowerShell comes in two flavours on the Start menu — plain Windows PowerShell and Windows PowerShell ISE, the old script editor. For day-to-day use you want the plain one; our guide to the difference between PowerShell and PowerShell ISE explains when the ISE is still useful and when it isn't.

The upgrade nobody mentions: PowerShell 7 as your default

Everything above swaps CMD for Windows PowerShell 5.1 — the blue-icon version baked into Windows since 2016 and no longer being developed beyond fixes. The current product is PowerShell 7, a free, separate, side-by-side install; as of mid-2026 the LTS release is 7.6, built on .NET 10. It's faster, cross-platform, and where all new features land.

Install it with one command from any existing shell:

winget install --id Microsoft.PowerShell --source winget

It appears as pwsh.exe, leaves 5.1 untouched, and Windows Terminal automatically grows a new profile called PowerShell (black icon) alongside Windows PowerShell (blue icon). Go back to Terminal → Startup → Default profile and pick the black one, and you've leapfrogged from CMD past 5.1 to the current shell in one move. Not sure what you're running right now? $PSVersionTable.PSVersion tells you, and our short guide on checking your PowerShell version walks through reading the output.

Ethan's opinion, for what it's worth: on a machine you use daily, default to PowerShell 7 and keep 5.1 for the rare module that demands it. On a shared or customer machine, leave the default at 5.1 — it's guaranteed present and nobody gets surprised. And PowerShell 7 runs on Linux and macOS too, which is genuinely useful if you hop between systems the way Jake's nephew does with his Kali Linux laptop — same shell, same scripts, both sides.

Every launch point at a glance

Where CMD appears Windows 11 Windows 10
Win + X menu Shows Terminal; set Terminal's default profile to PowerShell Settings > Personalization > Taskbar toggle
Run box (Win + R) No default exists — type powershell, pwsh or wt Same — type the shell you want
File Explorer folder Right-click → Open in Terminal, or type powershell in address bar Shift + right-click → Open PowerShell window here
Console apps' window Settings > System > For developers > Terminal → Windows Terminal Not available — conhost only
Pinned shortcuts Unpin CMD, pin Terminal or PowerShell Same on both
Batch (.bat/.cmd) files Always run in cmd.exe — leave alone Same — by design

Your CMD habits, translated

The fear that stops most people switching: "I'll have to relearn everything." You won't. PowerShell ships with aliases — friendly nicknames — for the CMD commands people actually use, so dir, cd, cls, copy, del and type all work on day one. The catch is the switches: dir /s fails, because /s belongs to CMD's dir, not PowerShell's. Here's the translation for the ones that trip people up:

In CMD In PowerShell Notes
dir /sGet-ChildItem -RecursePlain dir works as-is
clsclsIdentical alias
ipconfig /allipconfig /allExternal tools run unchanged
copy a.txt b.txtcopy a.txt b.txtAlias for Copy-Item
findstr text fileSelect-String text filefindstr itself still works too
setGet-ChildItem Env:Variables use $env:PATH syntax
sfc /scannow, chkdsk, DISMSame commands, unchangedThey're programs, not CMD features

That last row matters more than the rest combined. The repair commands people open a terminal for — sfc /scannow, chkdsk, ipconfig, DISM — are standalone programs that run identically in PowerShell. If you've followed our DISM RestoreHealth troubleshooting guide, every command in it works from an elevated PowerShell exactly as it did from CMD. Nothing about switching shells costs you your repair toolkit.

And PowerShell adds tools CMD never had. One-liners like Get-CimInstance Win32_BIOS read hardware details straight from Windows Management Instrumentation — we use it in our guide to finding your BIOS version with PowerShell, and the same idea extends to pulling your full system specs without opening a single Settings page.

Where you should leave CMD alone

A guide that only cheerleads for PowerShell isn't being straight with you, so here are the limits.

Batch files stay on CMD, by design. Double-click a .bat or .cmd file and it runs through cmd.exe no matter what defaults you've set. That's correct: those scripts are written in CMD's language. Jake's stock-label printer came with a setup.bat; it runs fine on his "fully PowerShell" machine because none of the settings on this page touch script execution.

Old tools may want a real console. A handful of legacy programs misbehave inside Windows Terminal. If one does, flip Settings > System > For developers > Terminal back to Windows Console Host temporarily, or just launch that one tool from a CMD window. Rare, but it happens with ancient point-of-sale and diagnostic software — exactly the category small shops run.

And CMD is not deprecated. Microsoft said it plainly when these rumours first spread in 2017: Command Prompt is staying in Windows. Nine years later, it's still true — it ships in Windows 11 25H2 today. PowerShell replaced it as the default, not as a component. Anyone selling you a way to delete it is describing something Windows won't let you do, and shouldn't.

‍♂️ Jake's Reality Check

"Honestly — for someone like me who opens a terminal twice a month to run sfc /scannow, does any of this matter?"

Less than the internet pretends. Your repair commands work identically in both shells. The switch matters when you start automating — the day you want one script that backs up the shop database, checks disk health and emails you, that's PowerShell territory and CMD genuinely can't do it. Until then, the honest benefit is just that Windows' defaults and your habits point the same way.

Frequently asked questions

Can I completely uninstall Command Prompt from Windows 11 or 10?

No. cmd.exe is a protected system file in System32, not an optional feature, and batch scripts — including ones Windows and app installers run internally — depend on it. You can remove every visible shortcut to it, which is what "replacing" actually means, but the file stays.

Is Microsoft removing Command Prompt from Windows?

No. Microsoft publicly stated in 2017 that CMD is staying, and it still ships in Windows 11 25H2 in 2026. What changed is the default: Windows Terminal and PowerShell are what Windows hands you first. CMD remains for compatibility.

What is the difference between Windows PowerShell and PowerShell 7?

Windows PowerShell 5.1 (powershell.exe, blue icon) is built into Windows and gets fixes only. PowerShell 7 (pwsh.exe, black icon) is the actively developed version — 7.6 LTS as of mid-2026 — installed separately and running side by side with 5.1. Both replace CMD equally well for everyday use.

Why does typing cmd in the Run box still open Command Prompt?

Because the Run box has no default shell — it launches whatever name you type. cmd opens CMD, powershell opens PowerShell, wt opens Windows Terminal. No setting changes this, and no setting needs to.

How do I make Win + X open PowerShell instead of Command Prompt?

Windows 10: Settings > Personalization > Taskbar > turn on "Replace Command Prompt with Windows PowerShell". Windows 11: the menu shows Terminal — set Terminal's default profile to PowerShell in its Startup settings and Win + X follows automatically.

How do I make Windows Terminal open PowerShell by default?

Open Terminal, press Ctrl + comma, go to Startup, set Default profile to Windows PowerShell (or PowerShell, the black icon, for version 7), and click Save. Every new tab and window uses it from then on.

Will replacing CMD with PowerShell break my .bat files?

No. Batch files always execute through cmd.exe regardless of your default terminal or profile settings. Only editing the COMSPEC environment variable can break them — which is exactly why you shouldn't touch it.

Do Command Prompt commands work inside PowerShell?

Mostly. dir, cd, cls, copy and del work as aliases, and external programs like ipconfig, sfc and chkdsk run unchanged. CMD-specific switches fail — use Get-ChildItem -Recurse instead of dir /s.

How do I open PowerShell as administrator?

Fastest: press Win + R, type powershell, then press Ctrl + Shift + Enter. On Windows 11 you can also press Win + X and choose Terminal (Admin). Accept the User Account Control prompt and the title bar shows "Administrator".

How do I open PowerShell in a specific folder?

Type powershell in that folder's File Explorer address bar and press Enter. Or on Windows 11, right-click inside the folder and pick Open in Terminal; on Windows 10, Shift + right-click and pick Open PowerShell window here.

Does any of this change on Windows 10 after end of support?

The steps all still work on Windows 10 22H2 — end of support stops security updates, not settings. But an internet-connected Windows 10 machine without updates is a risk: enrol in Extended Security Updates (now extended to October 2027) or plan the move to Windows 11.

Is Set-ExecutionPolicy Unrestricted safe to run?

Avoid it. It lets any script from any source run without warning, and it does nothing toward making PowerShell your default — that pairing came from a fabricated tutorial. If you need to run your own scripts, RemoteSigned scoped to CurrentUser is the safer setting.

Should I install PowerShell 7 or keep Windows PowerShell 5.1?

For a personal machine, install 7 — it's free, faster, current, and coexists with 5.1. On shared or work machines, 5.1 is guaranteed present and fine for everyday commands. Either one replaces CMD for daily use; check what you have with $PSVersionTable.PSVersion.

Where to go from here

Jake's counter PC now opens PowerShell from every shortcut he uses, CMD sits untouched underneath for his printer's batch script, and the registry key he spent a Sunday hunting officially does not exist. If this page saved you the same Sunday, these are the natural next steps:

Revision note. Originally published 25 July 2015; revised 2025;now rewritten for latest updates after re-testing im 1 August 2026 on Windows 11 25H2 (build 26200) and Windows 10 22H2. The 2025 revision of this article described an Optional Features uninstall, a "Default Command-Line Interface" registry key and a Set-DefaultTerminalApplication cmdlet — which are now upgraded, and hence so we had updated the same.

Related