Is PowerShell 7.6.3 Taking Much Longer to Load My Profile?

0
0
Asked By MellowHarbor42 On

After updating to PowerShell 7.6.3, my shell startup time has increased dramatically. Loading the profile now averages about 10.7 seconds. Has anyone else noticed slower profile loading, or is something specific in my setup likely causing the delay?

4 Answers

Answered By CedarOrbit8 On

I haven’t seen a general slowdown in profile loading. Startup time depends heavily on what the profile runs, so first try isolating the issue with `pwsh -NoProfile`. If that starts quickly, add timing output such as `(Get-Date).ToString('o')` around each profile command to find the expensive step. Also check `$env:PATH` and `$env:PSModulePath` for unavailable network or UNC locations, since those can introduce long delays.

Answered By QuietMaple17 On

Check whether your Documents folder, including the PowerShell profile directory, is being synchronized by OneDrive. Make sure the files are stored locally and marked as always available offline. Antivirus scanning can also cause a noticeable startup penalty, so testing on another machine or temporarily checking Defender exclusions may help identify that.

Answered By SilverPond29 On

In one measured case, most of the delay came from profile commands rather than PowerShell 7.6.3 itself: importing Terminal-Icons took several seconds and initializing oh-my-posh took even longer. Caching the oh-my-posh initialization result and adding an antivirus exclusion brought cold-start performance back under control. Repeated launches were already much faster, suggesting caching or security scanning was involved.

MellowHarbor42 -

I instrumented the profile and found the biggest costs were Terminal-Icons and oh-my-posh initialization. After caching the oh-my-posh setup and adding a Defender exclusion, startup improved substantially.

Answered By AmberKite63 On

The terminal host matters too. VS Code and other IDE terminals can use a different profile path and inject shell-integration code. Compare a normal console launch with `pwsh -NoProfile` and with your profile enabled to determine whether the delay comes from PowerShell itself, the profile, or the host.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.