question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Calling powershell.exe in PSCore6 on Windows starts Windows PowerShell

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
iSazonovcommented, Jul 6, 2017

@SteveL-MSFT Maybe Area-SideBySide?

0reactions
SteveL-MSFTcommented, Jul 13, 2017

If we decide to do https://github.com/PowerShell/PowerShell/issues/4214, we don’t need to address this one

Read more comments on GitHub >

github_iconTop Results From Across the Web

Powershell Keeps Popping Up When I start My PC
I see a blue window called Powershell.exe. ... Search start menu for task scheduler, run as admin, and check for any that startup...
Read more >
Windows powershell randomly popping up.
We suggest that you check the Task Scheduler. Click on Start. In the search bar, type Task Scheduler and click on Task Scheduler...
Read more >
50
Suppress "Try the new cross-platform PowerShell https://aka.ms/pscore6" · I just open a the window then just type cls or Clear-Host to remove ...
Read more >
Fixes for Windows PowerShell Keeps Popping up on ...
If Windows PowerShell keeps popping up on startup in Windows 10/11, what should you do to fix this issue? Try 8 ways here...
Read more >
windows 10 - PowerShell start not complete
PowerShell. td;dr PowerShell runs only as Admin. symptome. if I run PowerShell.exe it runs until window is open then stops and just shows:...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found