The question is simple, even though the answer might not be, but how can I replace Windows 10 default powershell (major 5) with the one on GitHub (Major 6)?
If installed normally it'll be installed in %programfiles%\PowerShell
with executable named pwsh.exe
. Is there a way of updating PS 'locally' so that it gets automatically replaced by the newest one? Am I missing something?
Best Answer
PowerShell Core intentionally does not replace the built-in PowerShell:
Since PS Core does have backwards-compatibility-breaking changes, this is probably not a good idea just yet. You'll find some administrative modules will not work in PowerShell Core.
Microsoft is still working on a roadmap for bundling PowerShell Core into Windows by default. It is entirely possible that the older PowerShell 5.1 is still included for backwards compatibility - in much the same way IE is still included despite Edge being the default.
If your goal is just that launching
powershell.exe
will launch Core, you can place the PS Core folder earlier in thePATH
so it is discovered first. Note that this could break scripts that need anything PS Core does not support.