How to update Cmder to use PowerShell Core


With PowerShell Core 6.0.0 released I'd like to start using it instead of Windows 10's default PowerShell.

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).

I've tried updating the Task parameters for Powershell::Powershell to the following:

/dir "C:\Program Files\PowerShell\6.0.0\" /icon "%CMDER_ROOT%\icons\cmder_blue.ico"

Then I update the commands to this:

"%ProgramFiles%\PowerShell\6.0.0\PowerShell.exe" -ExecutionPolicy Bypass -NoLogo -NoProfile -NoExit -Command "Invoke-Expression '. ''%ConEmuDir%\..\profile.ps1'''" -new_console:d:"%USERPROFILE%" -new_console:d:D:\git

However, it's breaking with the following error:

'c:\program' is not recognized as an internal or external command, operable program or batch file.

How would I setup Cmder/ConEmu to call the PowerShell Core version of PowerShell instead of the default installation?

Best Answer


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

enter image description here