Approve-WsusUpdate

Approves an update to be applied to clients.

Syntax

Approve-WsusUpdate
       -Action <UpdateApprovalAction>
       -TargetGroupName <String>
       -Update <WsusUpdate>
       [-Confirm]
       [-WhatIf]

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.

Examples

EXAMPLE 1

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

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

Required Parameters

-Action

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

-- Install

-- Not Approved

-- Uninstall

Type:UpdateApprovalAction
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-TargetGroupName

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

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Update

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.

Type:WsusUpdate
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False

Optional Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
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.

Type:SwitchParameter
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

Microsoft UpdateServices.Commands.WsusUpdate

WsusUpdate