Windows Update クライアント情報の初期化

Windows Updateが失敗する場合、下記の作業で解消することがある。WSUSの環境でも同様です。但し、数回実施して解消しない場合、OSの再インストールを実施する。

Windows Update サービスの停止

net stop wuauserv

Background Intelligent Transfer Services サービスの停止

net stop bits

SoftwareDistribution フォルダ名の変更

ren %systemroot%\SoftwareDistribution SoftwareDistribution.old

 ※既定値 C:\Windows\SoftwareDistribution

 ※SoftwareDistributionフォルダは、Windows Update 構成ファイル、過去のダウンロード、ダウンロード中の更新ファイルを保存している。

 ※このフォルダは、最後に削除しても問題がないと思う。

catroot2 フォルダ名の変更

ren %systemroot%\catroot2 catroot2.old

 ※catroot2 フォルダは、更新プログラムを確認するための署名ファイルを保存されている。

BITS ジョブの削除

del %ALLUSERSPROFILE%\Microsoft\Network\Downloader\qmgr0.dat del %ALLUSERSPROFILE%\Microsoft\Network\Downloader\qmgr1.dat

 ※qmgr0.dat、qmgr1.datは、ダウンロード中の更新ファイルを管理している。

Windows 10 バージョン 1703 以降では、qmgr0.dat, qmgr1.dat ファイルが存在しないため下記のコマンドにて削除を実施する。

del /Q %ALLUSERSPROFILE%\Microsoft\Network\Downloader*

Background Intelligent Transfer Services サービスの開始

net start bits

Windows Update サービスの開始

net start wuauserv

「設定」-「更新とセキュリティ」-「Windows Update」をクリックし、「更新プログラムのチェック」をクリックする。

Windows Updateをコマンドで実行する場合は、下記の通り。

usoclient startscan

Windows Updateが正常終了することを確認する。