Powershell: PATH is not set correctly after installation of 7.0-Preview.6

Created on 5 Dec 2019  路  4Comments  路  Source: PowerShell/PowerShell

Steps to reproduce

Install PowerShell using the MSI (x64) installer

Expected behavior

Running pwsh should start Powershell.

Actual behavior

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

Environment data

Windows Server 2019 (1809, build 17763)
PowerShell v7.0-preview.6

PATH is set to C:\Program Files\PowerShell\7-preview\preview while it is installed in C:\Program Files\PowerShell\7-preview... that's one preview too many.

Issue-Question Resolution-Answered

All 4 comments

@jeroenlandheer which operating system are you using, and which version of PowerShell did you try to install?

@vexx32
OS: MS Windows Server 2019 (v1809, build 17763)
Version: version 7.0-preview.6

(I updated the original post)

@jeroenlandheer For previews of pwsh, you are supposed to use pwsh-preview to start the shell, not pwsh. There should be a pwsh-preview.cmd file in C:\Program Files\PowerShell\7-preview\preview.

This issue has been marked as answered and has not had any activity for 1 day. It has been closed for housekeeping purposes.

Was this page helpful?
0 / 5 - 0 ratings