mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-20 06:29:50 +00:00
disable network discovery popup (#3875)
This commit is contained in:
committed by
GitHub
parent
dcb58dee7a
commit
a64db791f3
@@ -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
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user