-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Description
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.