The Computer Oracle

How do I update Cmder to use PowerShell Core?

--------------------------------------------------
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------

Music by Eric Matyas
https://www.soundimage.org
Track title: Forest of Spells Looping

--

Chapters
00:00 How Do I Update Cmder To Use Powershell Core?
01:10 Accepted Answer Score 34
01:29 Answer 2 Score 3
02:41 Answer 3 Score 0
03:40 Thank you

--

Full question
https://superuser.com/questions/1284987/...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#powershell #cmder

#avk47



ACCEPTED ANSWER

Score 34


Use

*pwsh -ExecutionPolicy Bypass -NoLogo -NoProfile -NoExit -Command "Invoke-Expression '. ''%ConEmuDir%\..\profile.ps1'''"

enter image description here




ANSWER 2

Score 3


I currently use Cmder for this, which is based upon ConEmu. There are already two PowerShell tasks and I assume that I can update them to point to my local install of PowerShell Core (in C:\Program Files\PowerShell\6.0.0).

You are using the wrong executable.

The binary name for PowerShell Core has been changed from powershell(.exe) to pwsh(.exe). This change provides a deterministic way for users to run PowerShell Core on machines to support side-by-side Windows PowerShell and PowerShell Core installations. pwsh is also much shorter and easier to type.

What's New in PowerShell Core 6.0

Additionally

You can launch PowerShell via the Start Menu or $env:ProgramFiles\PowerShell\pwsh.exe

Installing PowerShell Core on Windows




ANSWER 3

Score 0


After installing powershell 7/Core, you can use the ConEmu feature called Add/refresh default tasks to add extra tasks for pwsh. From the documentation:

In case you have installed a new application (for example new Visual Studio version) or new ConEmu build which knows more predefined shells than previous build, the new task is not created automatically by ConEmu without user’s request.

If you want to add missed tasks, or recreate existing tasks with default (recommended) parameters, just open ‘Tasks’ settings page and press ‘Add/recreate default tasks…’ button. ConEmu will confirm the action (‘Yes’ - add missed tasks; ‘No’ - rewrite existing tasks with defaults) and you will get new tasks at the end of the Tasks list!

Note that in cmder the button is actually labelled Add/refresh default tasks... in the Setup tasks dialog.