Approve-WsusUpdate

Approve-WsusUpdate

Approves an update to be applied to clients.

Syntax

Parameter Set: Default
Approve-WsusUpdate -Action <UpdateApprovalAction> -TargetGroupName <String> -Update <WsusUpdate> [-Confirm] [-WhatIf] [ <CommonParameters>]

Detailed Description

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

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

Parameters

-Action<UpdateApprovalAction>

Specifies the action that clients should perform when applying the associated update. The acceptable values for this parameter are:
-- Install
-- Not Approved
-- Uninstall

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-TargetGroupName<String>

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

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

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 piping the resulting WsusUpdate object into this cmdlet.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-Confirm

Prompts you for confirmation before running the cmdlet.

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

  • Microsoft UpdateServices.Commands.WsusUpdate

    WsusUpdate

Outputs

The output type is the type of the objects that the cmdlet emits.

Examples

EXAMPLE 1

This example 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"

Get-WsusUpdate