2
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

WSUSに登録されない大量コンピュータを一括登録

Last updated at Posted at 2019-12-05

状況

Azure運用の初期にVMを諸々カスタマイズ後、Sysprepせず固めたイメージからVM追加したため、WSUSに登録されるコンピューターが別のコンピューターに上書きされていた。

対応

VM別にWindowsUpdate用のクライアントIDをリセット
サーバ台数が3桁あるため、Active Directoryのグループポリシーを利用して配布、実行する。

Reset-SusClientId.ps1

net stop wuauserv

Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate" -Name "SusClientId"
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate" -Name "SusClientIdValidation"

net start wuauserv

(New-Object -ComObject "Microsoft.Update.AutoUpdate").DetectNow()

グループポリシー

ファイル配布

  • コンピューターの構成 -> 基本設定 -> Windowsの設定 -> ファイル
  • アクション: 更新
  • ソースファイル: \{DC}\share\Reset-SusClientId.ps1
  • ターゲットフォルダー: C:\workspace

タスクスケジュール

  • コンピューターの構成 -> 基本設定 -> コントロールパンネルの設定 -> タスク(即時タスク)
  • セキュリティオプション ユーザーアカウント: NT AUTHORITY\System
  • 操作: powershell.exe C:\workspace\Reset-SusClientId.ps1

残タスク

  • 追加したGPOを無効にするか、削除

参考

2
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?