原文參照 :

[WIN] Server 2012 WSUS 4.0 安裝設定

[WIN]WSUS更新主機無法接收CLIENT的更新狀態解決方式使用批次檔及註冊機檔

[WIN]WSUS 更新失敗處理方式

WSUS用command line 完成使用羣組原則或登錄設定來設定自動更新,重新註冊DLL,WSUS服務,刪除因為使用GHOST電腦導致無法回報問題!!

刪除SoftwareDistribution因為更新爆炸無法回報的問題!!

應該是集大成了吧!!

偷懶用成一個 批次檔案

@echo off
net stop wuauserv
regsvr32 wuapi.dll
regsvr32 wups.dll
regsvr32 wups2.dll
net stop bits
net start bits
net stop w32time
net start w32time
net stop msiserver
net start msiserver

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 HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\ /v WUServer /t REG_SZ /d http://172.22.3.39:8530 /f
reg add HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\ /v WUStatusServer /t REG_SZ /d http://172.22.3.39:8530 /f
reg add HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\ /v ElevateNonAdmins /t REG_dword /d 00000001 /f
reg add HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\ /v AcceptTrustedPublisherCerts /t REG_dword /d 00000001 /f


reg add HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU\ /v AUOptions /t REG_dword /d 00000004 /f
reg add HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU\ /v DetectionFrequency /t REG_dword /d 00000001 /f
reg add HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU\ /v DetectionFrequencyEnabled /t REG_dword /d 00000004 /f
reg add HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU\ /v NoAutoUpdate /t REG_dword /d 00000000 /f
reg add HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU\ /v RebootWarningTimeoutEnabled /t REG_dword /d 00000001 /f
reg add HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU\ /v RebootWarningTimeout /t  REG_dword /d 00000002 /f
reg add HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU\ /v ScheduledInstallDay /t REG_dword /d 00000000 /f
reg add HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU\ /v ScheduledInstallTime /t REG_dword /d 00000004 /f
reg add HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU\ /v UseWUServer /t REG_dword /d 00000001 /f
reg add HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU\ /v NoAutoRebootWithLoggedOnUsers /t REG_dword /d 00000001 /f
reg add HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU\ /v RescheduleWaitTime /t REG_dword /d 00000020 /f

del %SystemRoot%\SoftwareDistribution\*.* /S /Q

net start wuauserv
wuauclt /resetauthorization /detectnow
wuauclt.exe /downloadnow
wuauclt.exe /reportnow


pause

 

省掉註冊機檔檔案的麻煩 !!

註解參照

微軟網站: 

如何使用羣組原則或登錄設定來設定自動更新

WSUS 不使用AD,還有用嗎?

[REGISTRY] 透過登錄檔維護WINDOWS系統


相關文章