Approve-WsusUpdate

適用於: Windows 10, Windows Server Technical Preview

Approve-WsusUpdate

Approves an update to be applied to clients.

語法

Parameter Set: Default
Approve-WsusUpdate -Action <UpdateApprovalAction> {Install | Uninstall | NotApproved | All} -TargetGroupName <String> -Update <WsusUpdate> [-InformationAction <System.Management.Automation.ActionPreference> {SilentlyContinue | Stop | Continue | Inquire | Ignore | Suspend} ] [-InformationVariable <System.String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

詳細描述

The Approve-WsusUpdate cmdlet approves an update to be applied to clients. This operation requires Windows Server Update Services (WSUS) Administrator privileges.

To use this cmdlet, run the Get-WsusUpdate cmdlet and pipe the resulting WsusUpdate object into this cmdlet.

參數

-Action<UpdateApprovalAction>

Specifies the action that clients should perform when applying the associated update. 這個參數可接受的值如下:

-- Install
-- Not Approved
-- Uninstall

別名

none

必要項?

true

位置?

named

預設值

none

接受管線輸入?

false

接受萬用字元?

false

-InformationAction<System.Management.Automation.ActionPreference>

Specifies how this cmdlet responds to an information event. 這個參數可接受的值如下:

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

別名

infa

必要項?

false

位置?

named

預設值

none

接受管線輸入?

false

接受萬用字元?

false

-InformationVariable<System.String>

Specifies an information variable.

別名

iv

必要項?

false

位置?

named

預設值

none

接受管線輸入?

false

接受萬用字元?

false

-TargetGroupName<String>

Specifies the name of the computer target group for which to run this cmdlet.

別名

none

必要項?

true

位置?

named

預設值

none

接受管線輸入?

false

接受萬用字元?

false

-Update<WsusUpdate>

Specifies the object that contains the server of the update to be approved or denied as well as the update to be approved or denied. This value is obtained by running the Get-WsusUpdate cmdlet and passing the resulting WsusUpdate object into this cmdlet.

別名

none

必要項?

true

位置?

named

預設值

none

接受管線輸入?

true (ByValue)

接受萬用字元?

false

-Confirm

在執行指令程式之前提示您確認。

必要項?

false

位置?

named

預設值

false

接受管線輸入?

false

接受萬用字元?

false

-WhatIf

示範當執行指令程式時會發生什麼事情。此指令程式並未執行。

必要項?

false

位置?

named

預設值

false

接受管線輸入?

false

接受萬用字元?

false

<CommonParameters>

這個指令程式支援一般參數:-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer 和 -OutVariable。如需詳細資訊,請參閱 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216)。

輸入

輸入類型是可透過管道傳送至指令程式的物件類型。

  • Microsoft UpdateServices.Commands.WsusUpdate

輸出

輸出類型是指令程式所發出的物件類型。

範例

Example 1: Approve updates

This command approves for installation all unapproved updates with a status of failed or needed.

PS C:\> Get-WsusUpdate -Classification All -Approval Unapproved -Status FailedOrNeeded | Approve-WsusUpdate -Action Install -TargetGroupName "All Computers"

相關主題

Deny-WsusUpdate

Get-WsusUpdate