From a64db791f32ffe355d7397c1ac896d42686e9dfa Mon Sep 17 00:00:00 2001 From: Aleksandr Chebotov <47745270+al-cheb@users.noreply.github.com> Date: Tue, 10 Aug 2021 17:24:51 +0300 Subject: [PATCH] disable network discovery popup (#3875) --- images/win/scripts/Installers/Initialize-VM.ps1 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/images/win/scripts/Installers/Initialize-VM.ps1 b/images/win/scripts/Installers/Initialize-VM.ps1 index 5f50870e..3e3af742 100644 --- a/images/win/scripts/Installers/Initialize-VM.ps1 +++ b/images/win/scripts/Installers/Initialize-VM.ps1 @@ -43,6 +43,12 @@ function Disable-WindowsUpdate { # Enable $ErrorActionPreference='Stop' for AllUsersAllHosts Add-Content -Path $profile.AllUsersAllHosts -Value '$ErrorActionPreference="Stop"' +Write-Host "Disable Server Manager on Logon" +Get-ScheduledTask -TaskName ServerManager | Disable-ScheduledTask + +Write-Host "Disable 'Allow your PC to be discoverable by other PCs' popup" +New-Item -Path HKLM:\System\CurrentControlSet\Control\Network -Name NewNetworkWindowOff -Force + Write-Host "Disable Windows Update" Disable-WindowsUpdate