Windows Server 2019 で利用可能な WSUS の Windows PowerShell コマンドレット (Get-WsusClassification) について

ブログ エントリ内にアフィリエイト広告が含まれています
スポンサーリンク

以前、WSUS (Windows Server Update Services) の Windows PowerShell コマンドレット一覧 (https://kogelog.com/2013/12/21/20131221-01/) というブログ エントリを公開しましたが、Windows Server 2012 R2 の情報を元にしていました。

さすがに情報の鮮度がなくなっている状況なので、Windows Server 2019 (バージョン 1809; OS ビルド 17763.1039) で確認した WSUS コマンドレットを日本語の情報として纏めてみました。
※Windows Server 2019 と Windows Server 2016 でコマンドレットの違いは (たぶん) ないです。

このブログ エントリでは、「Get-WsusClassification」コマンドレットのヘルプ情報 (意訳)について記載します (WSUS コマンドレット一覧については、「Windows Server 2019 で利用可能な WSUS の Windows PowerShell コマンドレットについて」を参照)。

Get-WsusClassification コマンドレット (意訳)

名前

Get-WsusClassification

概要

システムで現在使用可能なすべての WSUS 分類のリストを取得します。

構文

Get-WsusClassification
  [-InformationAction {SilentlyContinue | Stop | Continue | Inquire | Ignore | Suspend}]
  [-InformationVariable <System.String>]
  [-UpdateServer <IUpdateServer>]
  [<CommonParameters>]

説明

Get-WsusClassification コマンドレットは、すべての Windows Server Update Services (WSUS) 分類情報のリストを取得します。Where-Object コマンドレットを使用してこのリストをフィルター処理し、結果を Set-WsusClassification コマンドレットに渡すことが可能です。

パラメーター

-InformationAction [<System.Management.Automation.ActionPreference>]

このコマンドレットが情報イベントに応答する方法を指定します。このパラメーターで利用可能な値は、次のとおりです :

  • Continue
  • Ignore
  • Inquire
  • SilentlyContinue
  • Stop
  • Suspend
必須 false
位置 named
既定値 none
パイプライン入力を許可する false
ワイルドカード文字を許可する false

-InformationVariable [<System.String>]

情報変数を指定します。

必須 false
位置 named
既定値 none
パイプライン入力を許可する false
ワイルドカード文字を許可する false

-UpdateServer [<IUpdateServer>]

WSUS サーバーを含むオブジェクトを指定します。この値は、Get-WsusServer コマンドレットを呼び出し、結果の IUpdateServer オブジェクトをこのコマンドレットに渡すことで取得されます。

必須 false
位置 named
既定値 none
パイプライン入力を許可する true (ByValue)
ワイルドカード文字を許可する false

<CommonParameters>

このコマンドレットは、次の共通パラメーターをサポートします: Verbose、Debug、ErrorAction、ErrorVariable、WarningAction、WarningVariable、OutBuffer, PipelineVariable、および OutVariable。詳細については、about_CommonParameters を参照してください。

入力

  • Microsoft.UpdateServices.Commands.IUpdateServer

出力

例 1 : 分類情報を取得する

コマンド
 Get-WsusServer | Get-WsusClassification 
コマンドの実行結果

Title                       ID
—–                       —
Applications            5c9376ab-8ce6-464a-b136-22113dd69801
Critical Updates       e6cf1350-c01b-414d-a61f-263d14d133b4
Definition Updates   e0789628-ce08-4437-be74-2495b842f43b
Drivers                   ebfc1fc5-71a4-4f7b-9aca-3b9a503104a0
Feature Packs         b54e7d24-7add-428f-8b75-90a396fa584f
Security Updates     0fa1201d-4330-4fa8-8ae9-b877473b6441
Service Packs          68c5b0a3-d1a6-4553-ae49-01d3a7827828
Tools                      b4832bd8-e735-4761-8daf-37f882276dab
Update Rollups        28bc880e-0592-4cbf-8f95-c79b17911d5f
Updates                  cd5ffd1e-e932-4e3a-bf74-18bf0b1bbd83

コマンドの説明

このコマンドは、すべての分類情報を取得します。

例 2 : 指定したタイトルを持つ分類情報を取得する

コマンド
 Get-WsusServer | Get-WsusClassification | Where-Object -FilterScript {$_.Classification.Title -Eq "Drivers"} 
コマンドの実行結果

Title         ID
—–         —
Drivers     ebfc1fc5-71a4-4f7b-9aca-3b9a503104a0

コマンドの説明

このコマンドは、タイトル Drivers に合致する分類情報を取得します。

関連するリンク

  • Where-Object
  • Set-WsusClassification
  • Get-WsusServer

参考

タイトルとURLをコピーしました