disable network discovery popup (#3875)

This commit is contained in:
Aleksandr Chebotov
2021-08-10 17:24:51 +03:00
committed by GitHub
parent dcb58dee7a
commit a64db791f3

View File

@@ -43,6 +43,12 @@ function Disable-WindowsUpdate {
# Enable $ErrorActionPreference='Stop' for AllUsersAllHosts # Enable $ErrorActionPreference='Stop' for AllUsersAllHosts
Add-Content -Path $profile.AllUsersAllHosts -Value '$ErrorActionPreference="Stop"' 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" Write-Host "Disable Windows Update"
Disable-WindowsUpdate Disable-WindowsUpdate