Tinus EngOps Wiki

Logo

OpsaC - Operating as PowerShell code

Links

Home

PowerShell Blog

PowerShell Index

PowerShell Search

Additional Websites

View my GitHub Profile

View my GitHub Gists

View Tinus IT Wiki

View my Photo Website

PowerShell Settings

published: June 2, 2025 author: Tinu tags: PowerShell categories: PowerShell-Basic


Table of Contents

Delay PowerShell start

Skip Powershell startup check for new version.

  • 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
[System.Environment]::SetEnvironmentVariable("POWERSHELL_UPDATECHECK", "Off", [System.EnvironmentVariableTarget]::Machine)

Include all other settings (for user and machine):

$variables = [ordered]@{
   POWERSHELL_CLI_TELEMETRY_OPTOUT = "1"
   POWERSHELL_TELEMETRY_OPTOUT     = "1"
   POWERSHELL_UPDATECHECK          = "Off"
   POWERSHELL_UPDATECHECK_OPTOUT   = "1"
   DOTNET_CLI_TELEMETRY_OPTOUT     = "1"
   DOTNET_TELEMETRY_OPTOUT         = "1"
   COMPlus_EnableDiagnostics       = "0"
}

foreach ($target in "User","Machine") {
    Write-Host "Target: $target" -foregroundcolor cyan
    ($key in $variables.Keys) {
        Write-Host "  $key = $($variables.$Key)"
        [Environment]::SetEnvironmentVariable($key,$variables.$Key, $target)
    }
}

See also

About_Update_Notifications on Microsoft Docs.


← Previous Post [ Top ] Copyright © 2024 by tinuwalther [ Blog ]