码迷,mamicode.com
首页 > 其他好文 > 详细

加入WSUS补丁服务器并下载补丁

时间:2019-10-16 11:26:57      阅读:93      评论:0      收藏:0      [点我收藏+]

标签:main   auc   for   install   enabled   tar   不安装   auth   word   

--------加入WSUS补丁服务器并下载补丁_不安装-------

@echo off

reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate /v AccountDomainSid /f
reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate /v PingID /f
reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate /v SusClientId /f
reg add HKLM\SOFTWARE\Policies\Microsoft\windows\WindowsUpdate /v WUServer /d "http://10.5.18.107:8530" /f
reg add HKLM\SOFTWARE\Policies\Microsoft\windows\WindowsUpdate /v WUStatusServer /d "http://10.5.18.107:8530" /f
reg add HKLM\SOFTWARE\Policies\Microsoft\windows\WindowsUpdate /v TargetGroupEnabled /t REG_DWORD /d 1 /f
reg add HKLM\SOFTWARE\Policies\Microsoft\windows\WindowsUpdate\AU /f
reg add HKLM\SOFTWARE\Policies\Microsoft\windows\WindowsUpdate\AU /v AUOptions /t REG_DWORD /d 3 /f
reg add HKLM\SOFTWARE\Policies\Microsoft\windows\WindowsUpdate\AU /v NoAutoUpdate /t REG_DWORD /d 0 /f
reg add HKLM\SOFTWARE\Policies\Microsoft\windows\WindowsUpdate\AU /v ScheduledInstallDay /t REG_DWORD /d 0 /f
reg add HKLM\SOFTWARE\Policies\Microsoft\windows\WindowsUpdate\AU /v ScheduledInstallTime /t REG_DWORD /d 0 /f
reg add HKLM\SOFTWARE\Policies\Microsoft\windows\WindowsUpdate\AU /v UseWUServer /t REG_DWORD /d 1 /f
reg add HKLM\SOFTWARE\Policies\Microsoft\windows\WindowsUpdate\AU /v NoAutoRebootWithLoggedOnUsers /t REG_DWORD /d 1 /f
reg add HKLM\SOFTWARE\Policies\Microsoft\windows\WindowsUpdate\AU /v AutoInstallMinorUpdates /t REG_DWORD /d 1 /f
gpupdate /force

net stop wuauserv
del %SystemRoot%\SoftwareDistribution\*.* /S /Q
net start wuauserv
wuauclt /resetauthorization /detectnow
wuauclt /downloadnow
wuauclt /reportnow

 

--------加入WSUS补丁服务器并下载补丁_自动安装-------

@echo off

reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate /v AccountDomainSid /f
reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate /v PingID /f
reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate /v SusClientId /f
reg add HKLM\SOFTWARE\Policies\Microsoft\windows\WindowsUpdate /v WUServer /d "http://10.5.18.107:8530" /f
reg add HKLM\SOFTWARE\Policies\Microsoft\windows\WindowsUpdate /v WUStatusServer /d "http://10.5.18.107:8530" /f
reg add HKLM\SOFTWARE\Policies\Microsoft\windows\WindowsUpdate /v TargetGroupEnabled /t REG_DWORD /d 1 /f
reg add HKLM\SOFTWARE\Policies\Microsoft\windows\WindowsUpdate\AU /f
reg add HKLM\SOFTWARE\Policies\Microsoft\windows\WindowsUpdate\AU /v AUOptions /t REG_DWORD /d 4 /f
reg add HKLM\SOFTWARE\Policies\Microsoft\windows\WindowsUpdate\AU /v NoAutoUpdate /t REG_DWORD /d 0 /f
reg add HKLM\SOFTWARE\Policies\Microsoft\windows\WindowsUpdate\AU /v ScheduledInstallDay /t REG_DWORD /d 0 /f
reg add HKLM\SOFTWARE\Policies\Microsoft\windows\WindowsUpdate\AU /v ScheduledInstallTime /t REG_DWORD /d 0 /f
reg add HKLM\SOFTWARE\Policies\Microsoft\windows\WindowsUpdate\AU /v UseWUServer /t REG_DWORD /d 1 /f
reg add HKLM\SOFTWARE\Policies\Microsoft\windows\WindowsUpdate\AU /v NoAutoRebootWithLoggedOnUsers /t REG_DWORD /d 1 /f
reg add HKLM\SOFTWARE\Policies\Microsoft\windows\WindowsUpdate\AU /v AutoInstallMinorUpdates /t REG_DWORD /d 1 /f
gpupdate /force

net stop wuauserv
del %SystemRoot%\SoftwareDistribution\*.* /S /Q
net start wuauserv
wuauclt /resetauthorization /detectnow
wuauclt /downloadnow
wuauclt /reportnow

加入WSUS补丁服务器并下载补丁

标签:main   auc   for   install   enabled   tar   不安装   auth   word   

原文地址:https://www.cnblogs.com/torn/p/11684096.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!