WSUS に関するメモです。
Q/A 情報は、まずtechnet
- とりあえずリンク集
WSUS 設定
https://ittrip.xyz/soft/windows/how-to-setup-wsus
クライアント側のupdate ファイル削除
https://itpc.blog.fc2.com/blog-entry-205.html
対象の製品のカテゴリや、選択するパッチ分類
$wsusServer = Get-WsusServer -Name サーバ名 -Port 8530(ポート)
$wsusSubscription = $wsusServer.GetSubscription()
$selectedProducts = $wsusSubscription.GetUpdateCategories() | Select Title
$selectedClassifications = $wsusSubscription.GetUpdateClassifications() | Select Title
function Get-InstalledKB
{
$session = New-Object -ComObject Microsoft.Update.Session
$searcher = $session.CreateUpdateSearcher()
$results = $searcher.QueryHistory(0, $searcher.GetTotalHistoryCount())
$results|
where Title -ne $null|
select @(
@{L="HotFixId";E={$_.Title -replace '^.*(KB\d+).*$','$1'}},
"Date",
"Title",
"Description"
)
}
簡単チェック
- wmic qfe list /format:htable > qfelist.htm
- get-wmiobject -class win32_quickfixengineering
履歴を全部だしたい場合
うまく行かない場合
報告を強制的あげさせる
すぐには機能しないみたい。
$AutoUpdates = New-Object -ComObject "Microsoft.Update.AutoUpdate"
$AutoUpdates.DetectNow()
これもすぐには機能しないみたい。
usoclient startscan
これがいいらしい
$updateSession = new-object -com "Microsoft.Update.Session"; $updates=$updateSession.CreateupdateSearcher().Search($criteria).Updates
のあとで、
wuauclt /reportnow