From b99c150f414937965b2c626d56e146664203e34f Mon Sep 17 00:00:00 2001 From: Aleksandr Chebotov Date: Tue, 10 Nov 2020 11:30:12 +0300 Subject: [PATCH] Off turns off the update notification feature --- images/win/scripts/Installers/Install-PowershellCore.ps1 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/images/win/scripts/Installers/Install-PowershellCore.ps1 b/images/win/scripts/Installers/Install-PowershellCore.ps1 index 1e620c74b..f968ebf9c 100644 --- a/images/win/scripts/Installers/Install-PowershellCore.ps1 +++ b/images/win/scripts/Installers/Install-PowershellCore.ps1 @@ -5,4 +5,10 @@ Invoke-Expression "& { $(Invoke-RestMethod https://aka.ms/install-powershell.ps1) } -UseMSI -Quiet" +# about_update_notifications +# While the update check happens during the first session in a given 24-hour period, for performance reasons, +# the notification will only be shown on the start of subsequent sessions. +# Also for performance reasons, the check will not start until at least 3 seconds after the session begins. +[System.Environment]::SetEnvironmentVariable("POWERSHELL_UPDATECHECK", "Off", [System.EnvironmentVariableTarget]::Machine) + Invoke-PesterTests -TestFile "Tools" -TestName "PowerShell Core"