Skip to content

PowerShell 7 preview 5 takes way too long to launch, far too slow #10983

@JasonFossen

Description

@JasonFossen

PROBLEM:
When opening PowerShell 7 Preview 5, it takes 6-10 seconds before the prompt/cursor appears so that commands may be entered. This is embarrassingly slow. If it is not some quirk of my VM, this must be fixed before GA.

REPRODUCE:
Fresh install of Windows Server 2019 Datacenter, version 1809, OS build 17763.737.
Network adapter enabled inside the VM.
VM is on an isolated virtual segment, no outside LAN access.
This Windows Server VM is its own DNS server.
Set POWERSHELL_TELEMETRY_OPTOUT = 1 as a system environment variable.
Install PowerShell Core 7.0.0-preview.5 x64.
Reboot and log on as Administrator.
Run App: pwsh.exe -noprofile
Must wait 6-9 seconds.
Confirm that POWERSHELL_TELEMETRY_OPTOUT = 1 is correctly set in pwsh.
Disable the VM network adapter inside the VM.
Run App: pwsh.exe -noprofile
Launches normally, less than 1 second delay.

NOTES:
PowerShell appears to be doing DNS lookups for ctldl.windowsupdate.com and api.github.com, possibly for telemetry spying, even though POWERSHELL_TELEMETRY_OPTOUT has been set to 1 in the Control Panel System app. The shell is blocking until the DNS lookups fail.

The telemetry spying is bad enough by itself, but the 8-second delay makes it unshippable, especially when telemetry opt out is configured. Many networks, like for the DoD, must run air-gapped.

Metadata

Metadata

Assignees

Labels

Documentation Needed in this repoDocumentation is needed in this repoIssue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aWG-Engine-Performancecore PowerShell engine, interpreter, and runtime performance

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions