Invoke-WsusServerCleanup

適用対象: Windows 10, Windows Server Technical Preview

Invoke-WsusServerCleanup

Performs the process of cleanup on a WSUS server.

構文

Parameter Set: Default
Invoke-WsusServerCleanup [-CleanupObsoleteComputers] [-CleanupObsoleteUpdates] [-CleanupUnneededContentFiles] [-CompressUpdates] [-DeclineExpiredUpdates] [-DeclineSupersededUpdates] [-InformationAction <System.Management.Automation.ActionPreference> {SilentlyContinue | Stop | Continue | Inquire | Ignore | Suspend} ] [-InformationVariable <System.String> ] [-UpdateServer <IUpdateServer> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

詳細説明

The Invoke-WsusServerCleanup cmdlet performs the process of cleanup on a specified Windows Server Update Services (WSUS) server. This process has the same impact as running the Cleanup Wizard from within the WSUS Console application and allows the specification of the same options as parameters.

パラメーター

-CleanupObsoleteComputers

Specifies that the cmdlet deletes obsolete computers from the database.

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-CleanupObsoleteUpdates

Specifies that the cmdlet deletes obsolete updates from the database.

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-CleanupUnneededContentFiles

Specifies that the cmdlet deletes unneeded update files.

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-CompressUpdates

Specifies that the cmdlet deletes obsolete revisions to updates from the database.

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-DeclineExpiredUpdates

Specifies that the cmdlet declines expired updates.

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-DeclineSupersededUpdates

Specifies that the cmdlet declines superseded updates.

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-InformationAction<System.Management.Automation.ActionPreference>

Specifies how this cmdlet responds to an information event. このパラメーターに指定できる値は、次のとおりです。

-- Continue
-- Ignore
-- Inquire
-- SilentlyContinue
-- Stop
-- Suspend

Aliases

infa

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-InformationVariable<System.String>

Specifies an information variable.

Aliases

iv

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-UpdateServer<IUpdateServer>

Specifies the object that contains the WSUS server. This value is obtained by calling the Get-WsusServer cmdlet and passing the resulting IUpdateServer object into this cmdlet.

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

true (ByValue)

ワイルドカード文字の受け入れ

false

-Confirm

コマンドレットを実行する前に確認メッセージを表示します。

必須/オプション

false

位置

named

既定値

false

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-WhatIf

コマンドレットが実行された場合に何が起きるのかを示します。コマンドレットは実行されません。

必須/オプション

false

位置

named

既定値

false

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

<CommonParameters>

このコマンドレットは共通のパラメーターをサポートしています(-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、および -OutVariable)。詳細については、TechNet の「 「about_CommonParameters」 (https://go.microsoft.com/fwlink/p/?LinkID=113216) を参照してください。

入力

入力型は、コマンドレットにパイプできるオブジェクトの型です。

  • Microsoft.UpdateServices.Commands.IUpdateServer

出力

出力型は、コマンドレットが出力するオブジェクトの型です。

  • None

使用例

Example 1: Run cleanup for obsolete computers

This command runs this cmdlet on the local WSUS server specifying the option to clean up obsolete computers.

PS C:\> Get-WsusServer | Invoke-WsusServerCleanup -CleanupObsoleteComputers

Example 2: Run cleanup for obsolete computers and updates

This command runs this cmdlet on the server named contoso specifying the options to clean up obsolete computers and obsolete updates.

PS C:\> Get-WsusServer consoso | Invoke-WsusServerCleanup -CleanupObsoleteComputers -CleanupObsoleteUpdates

関連項目

Get-WsusServer