Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

skip powershell startup check for new version

tl;dr How to force Powershell to skip checking for a new release?

When I start Powershell 7, it checks for a new version of Powershell.

Currently, this looks like

PowerShell 7.0.0
Copyright (c) Microsoft Corporation. All rights reserved.

https://aka.ms/powershell
Type 'help' to get help.

   A new PowerShell stable release is available: v7.1.3
   Upgrade now, or check out the release page at:
     https://aka.ms/PowerShell-Release?tag=v7.1.3

This check for a new release delays the start of Powershell. Sometimes this delay is ten to twenty seconds. It's mildly annoying. I'd like to skip the powershell release check.

like image 203
JamesThomasMoon Avatar asked Mar 22 '26 01:03

JamesThomasMoon


2 Answers

The accepted answer works for me, but with some adjustments.

Setting $env:POWERSHELL_UPDATECHECK = 'Off' in the PS profile $profile didn't disable the update checks.

I had to set the environment variable through system dialog: enter image description here

After setting the variable this way PS no longer hangs looking for the new version:

PowerShell 7.1.0
Copyright (c) Microsoft Corporation.

https://aka.ms/powershell
Type 'help' to get help.

PS7 >
like image 158
Pak Uula Avatar answered Mar 23 '26 15:03

Pak Uula


$env:POWERSHELL_UPDATECHECK = 'Off'

By default, PowerShell subscribes to one of two different notification channels depending on its version/branch. Supported, Generally Available (GA) versions of PowerShell only return notifications for updated GA releases. Preview and Release Candidate (RC) releases notify of updates to preview, RC, and GA releases.

The update notification behavior can be changed using the POWERSHELL_UPDATECHECK environment variable. The following values are supported:

Off turns off the update notification feature
Default is the same as not defining POWERSHELL_UPDATECHECK:
GA releases notify of updates to GA releases
Preview/RC releases notify of updates to GA and preview releases
LTS only notifies of updates to long-term-servicing (LTS) GA releases

The change to $env:POWERSHELL_UPDATECHECK can be added to the Profile script at $profile.

notepad $profile

Source: https://toastit.dev/2020/03/13/ps7now-update-notifications/

like image 25
TheGameiswar Avatar answered Mar 23 '26 16:03

TheGameiswar



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!