OpsaC - Operating as PowerShell code
published: June 2, 2025 author: Tinu tags: PowerShell categories: PowerShell-Basic
Skip Powershell startup check for new version.
Off
turns off the update notification featureDefault
is the same as not defining POWERSHELL_UPDATECHECK:
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)
}
}
About_Update_Notifications on Microsoft Docs.