JamesThomasMoon
JamesThomasMoon

Reputation: 7164

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.

Upvotes: 11

Views: 3972

Answers (3)

Dafi
Dafi

Reputation: 31

This is just an additional option for people in the future who run into the same problem as me. If you are new and too lazy to write boring commands or lines of code, you can check out the steps below 🤓

  1. Search for an environment variable in windows search with keywords like in the picture then click it
  2. Click on the button I marked with an arrow
  3. Click the new button
  4. List item
  5. Write down the variable name with : POWERSHELL_UPDATECHECK and the value is : false

Just search for an environment variable in windows search with keywords like in the picture then click it

click on the button I marked with an arrow

Click the new button

Write down the variable name with : POWERSHELL_UPDATECHECK and the value is : false

Upvotes: 0

Pak Uula
Pak Uula

Reputation: 3435

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 >

Upvotes: 21

TheGameiswar
TheGameiswar

Reputation: 28930

$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/

Upvotes: 3

Related Questions