Approve-WsusUpdate
Approves an update to be applied to clients.
Syntax
Default (Default)
Approve-WsusUpdate
-Update <WsusUpdate>
-Action <UpdateApprovalAction>
-TargetGroupName <String>
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
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.
Examples
Example 1: Approve updates
PS C:\> Get-WsusUpdate -Classification All -Approval Unapproved -Status FailedOrNeeded | Approve-WsusUpdate -Action Install -TargetGroupName "All Computers"
This command approves for installation all unapproved updates with a status of failed or needed.
Parameters
-Action
Specifies the action that clients should perform when applying the associated update. The acceptable values for this parameter are:
- Install
- NotApproved
- Uninstall
Parameter properties
Type: | UpdateApprovalAction |
Default value: | None |
Accepted values: | Install, Uninstall, NotApproved, All |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
Type: | SwitchParameter |
Default value: | False |
Supports wildcards: | False |
DontShow: | False |
Aliases: | cf |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-TargetGroupName
Specifies the name of the computer target group for which to run this cmdlet.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | 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 passing the resulting WsusUpdate object into this cmdlet.
Parameter properties
Type: | WsusUpdate |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | True |
Value from pipeline: | True |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Parameter properties
Type: | SwitchParameter |
Default value: | False |
Supports wildcards: | False |
DontShow: | False |
Aliases: | wi |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.