PowerShell Core doesn't display text

Created on 28 Dec 2018  路  24Comments  路  Source: PowerShell/PowerShell

Steps to reproduce

  1. Open PowerShell in Windows Explorer Context (Right click >> Open PowerShell)
  2. Wait and then Type command

Expected behavior

PowerShell display text immedialy

Actual behavior

image

Environment data

PowerShell 6.2.0-preview.3
Windows 10 build 18305.
SSD 256GB SATA3.
16GB RAM
Intel Core I5 4200H

Issue-Discussion OS-Windows

Most helpful comment

@kvprasoon the startup time has been improved already via https://github.com/PowerShell/PowerShell/pull/8341 although there is still additional work we can do to improve it, but it's not a priority for 6.2 since we're within the "ballpark" now.

As for the context menu, the difference is the command line arguments used to start pwsh. Otherwise it should be the same.

@TranNgocKhoa it should never take that long to start unless you have a complicated $Profile that's being run on startup

All 24 comments

What version of pwsh are you using ? Didn't get you with the step you have opened PowerShell, can you open it via Run (Windows key + R) -> pwsh

I updated issue. I use PowerShell 6.2.0-preview.3

I cannot reproduce. Is the command execution takes more time or not at all executing ?

I've seen things like this occurs in the VS Code integrated console, but never in the pwsh console itself.

Do you have anything in your PowerShell profile scripts?

Do you have anything in your PowerShell profile scripts

Sorry, I don't understand what you mean....

Is the command execution takes more time or not at all executing

When I try to _Right click >> Open PowerShell_ in Windows Explorer, it take quite long time and as you see, there is no text displayed here.
I think affter excute command ls, PowerShell does response but it can't display any text.

Is this display issue also present when you start pwsh in other ways?

Run get-content $profile to see if there is anything in your profile script.

Is this display issue also present when you start pwsh in other ways?

If I run PowerShell by normal way like click on pwsh.exe, or shortcut, it runs properly.

Run get-content $profile to see if there is anything in your profile script.

I try your command and this is the result
image

It seems @TranNgocKhoa is using the Context Menu integration option in the MSI installer. I don't see this problem on my Win10 machine.

@SteveL-MSFT Even with context menu integration, will there be any behavioural difference as its invoking same pwsh.exe ?

It seems @TranNgocKhoa is using the Context Menu integration option in the MSI installer. I don't see this problem on my Win10 machine.

And I don't know why but PS is booting quite slow. I have to wait for 2 - 5s until everything finish.
I use SSD for Disk C and with other machine that uses HDD, it's even slower.

The start time issue is tracked with #6443 . @SteveL-MSFT can you confirm and update the progress for us ?

@kvprasoon the startup time has been improved already via https://github.com/PowerShell/PowerShell/pull/8341 although there is still additional work we can do to improve it, but it's not a priority for 6.2 since we're within the "ballpark" now.

As for the context menu, the difference is the command line arguments used to start pwsh. Otherwise it should be the same.

@TranNgocKhoa it should never take that long to start unless you have a complicated $Profile that's being run on startup

As for the context menu, the difference is the command line arguments used to start pwsh. Otherwise it should be the same.

What should I do for now?
Is there any solution for it or should I wait for next release?

Try below,

Take a backup of command folder at
HKCR\Computer\HKEY_CLASSES_ROOT\Directory\ContextMenus\PowerShell6-previewx64\shell\openpwsh\command
and change the Default key value to C:\Program Files\PowerShell\6-preview\pwsh.exe -NoExit

@TranNgocKhoa if you uninstall PSCore6 and reinstall, does the problem still repro for you?

@TranNgocKhoa if you uninstall PSCore6 and reinstall, does the problem still repro for you?

No, problem still there

What antivirus do you use? Try after removing it.

What antivirus do you use? Try after removing it.

I use Windows Defender. I think it doesn't cause the problem.

Hello there... I'm stucking in this issue.

We can not repo. Exact steps are needed to reproduce the problem. Could you repo on fresh installed OS?

I just uninstall PowerShell 6.2.0-preview.3 and reinstall version 6.11 and It works.

@TranNgocKhoa if you reinstall 6.2.0-preview.3 does it work?

@TranNgocKhoa if you reinstall 6.2.0-preview.3 does it work?

@SteveL-MSFT No, I uninstalled 6.11 then installed 6.20 preview3. It doesn't work.

@TranNgocKhoa 6.1.x and 6.2.x-preview can be installed side-by-side, so you don't need to uninstall 6.1.1 to try 6.2-preview. Without understanding why this is affecting you, there's no action we can take to fix this since it's not reproing for anyone else right now.

Was this page helpful?
0 / 5 - 0 ratings