转载于https://jingyan.baidu.com/article/1e5468f94dc9a3484961b7a8.htmlhtml
在cortana中输入gpedit.msc ,打开通用管理文档windows
选择【计算机配置】-》【管理模板】-》【windows组件】安全
在右边【配置自动更新】,双击,而后选择已禁用spa
在cmd中输入services.msc ,打开服务列表3d
找到【windows update】 ,把启动类型改成禁用。code
点击开始,选择【设置】按钮htm
在设置中选择【更新和安全】blog
在更新设置中,进行相应修改和查看ci
查看配置的更新策略文档
同时按住win+x键,而后选中POWER SHELL,必定要管理员模式
Clear-Host
$WindowsUpdatePath = "HKLM:SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\"
$AutoUpdatePath = "HKLM:SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" If(Test-Path -Path $WindowsUpdatePath) { Remove-Item -Path $WindowsUpdatePath -Recurse } New-Item $WindowsUpdatePath -Force New-Item $AutoUpdatePath -Force Set-ItemProperty -Path $AutoUpdatePath -Name NoAutoUpdate -Value 1 Get-ScheduledTask -TaskPath "\Microsoft\Windows\WindowsUpdate\" | Disable-ScheduledTask takeown /F C:\Windows\System32\Tasks\Microsoft\Windows\UpdateOrchestrator /A /R icacls C:\Windows\System32\Tasks\Microsoft\Windows\UpdateOrchestrator /grant Administrators:F /T Get-ScheduledTask -TaskPath "\Microsoft\Windows\UpdateOrchestrator\" | Disable-ScheduledTask Stop-Service wuauserv Set-Service wuauserv -StartupType Disabled Write-Output "已经关闭全部的windows更新"
我的建议直接走脚本(方法四)