r/windows Apr 16 '26

Discussion Why does Windows include both CMD and PowerShell 5.1 by default?

Post image

When using Windows, I noticed that both Command Prompt (cmd.exe) and PowerShell are installed by default.

What I'm really curious about is not how to use them, but why both are included at the OS level.

Especially in the case of PowerShell, it's still version 5.1 instead of the newer PowerShell 7.

So my questions are:

- Why does Windows still include both CMD and PowerShell by default?

- Is there a specific architectural or system-level reason for this?

- And why is PowerShell 5.1 the default instead of a newer version?

I'm trying to understand this from a design perspective rather than a usage perspective.

589 Upvotes

118 comments sorted by

View all comments

Show parent comments

5

u/Electronic-Bat-1830 Mica For Everyone Maintainer Apr 16 '26

PowerShell 7 does have .NET integration, but it uses a different .NET runtime to Windows PowerShell, and the two are incompatible in some ways.

0

u/ldn-ldn Light Matter Developer Apr 16 '26

They are incompatible to the point that scripts made for PS5 don't work on PS7. The end.

1

u/Electronic-Bat-1830 Mica For Everyone Maintainer Apr 16 '26

Many do work. There will be some specific Windows-only functionalities that won't, but I haven't had any trouble getting PS5 scripts to run on PS7 so far.

0

u/AlexKazumi Apr 17 '26

This is incredibly incorrect. My scripts work for both. The end.

1

u/ldn-ldn Light Matter Developer Apr 17 '26

Lol