Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Calling powershell.exe in PSCore6 on Windows starts Windows PowerShell #4194

Copy link
Copy link
@SteveL-MSFT

Description

@SteveL-MSFT
Issue body actions

On Windows, $env:Path has Windows PowerShell in the path before $PSHOME which means that if you're in PowerShell Core 6 and type powershell, it starts Windows PowerShell 5.1 instead of a nested instance of PowerShell Core 6. This may be unexpected for end users as it seems that one would expect powershell to refer to the currently running version of PowerShell.

The immediate impact is that partner teams running existing PowerShell script tests in PowerShell Core 6 that spawn powershell will get incorrect results as that process is running Windows PowerShell.

cc @joeyaiello @HemantMahawar

Steps to reproduce

# within PowerShell Core 6
powershell
$psversiontable

Expected behavior

PowerShell Core 6

Actual behavior

Windows PowerShell 5.1

Environment data

Name                           Value
----                           -----
PSVersion                      6.0.0-beta
PSEdition                      Core
GitCommitId                    v6.0.0-beta.3
OS                             Microsoft Windows 10.0.16225
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0
Reactions are currently unavailable

Metadata

Metadata

Assignees

Labels

Area-SideBySiderelated to ability to run PS7 side-by-side with WinPS or different versions of PS7related to ability to run PS7 side-by-side with WinPS or different versions of PS7OS-WindowsResolution-FixedThe issue is fixed.The issue is fixed.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.