When I install PowerShell 7 on Windows, why does the built-in Windows PowerShell stay installed instead of being replaced?
Why doesn't PowerShell 7 replace the Windows version?
Answers
Compatibility is the big reason. Some scripts and modules written for Windows PowerShell 5.1 don't work the same way, or at all, in PowerShell 7. Replacing the older version could break tools that depend on it.
Installing them side by side lets you use PowerShell 7 where it works for you while keeping 5.1 available for older dependencies.
Reply to this answer
They also use different .NET runtimes. Windows PowerShell 5.1 runs on .NET Framework, while PowerShell 7 runs on modern .NET. That change helped make PowerShell cross-platform, but it also means 7 isn't just an in-place upgrade of the Windows-only edition.
Reply to this answer
Think of them as separate applications rather than one installation with a version number bumped up. PowerShell 7 can run on Windows, Linux, and macOS, while Windows PowerShell is tied to Windows.
Even some commands that exist in both versions have differences in what they can do, so it's worth checking the version-specific documentation when moving a script over.
Reply to this answer
Add your answer
Answers are reviewed before publication.
Related Discussions