1
4

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 5 years have passed since last update.

WSUS のメモ

Last updated at Posted at 2019-07-03

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

1
4
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
1
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?