Edit

Share via


Set-WsusClassification

Sets whether the classifications of updates that WSUS synchronizes are enabled.

Syntax

Default (Default)

Set-WsusClassification
    -Classification <WsusClassification>
    [-Disable]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

The Set-WsusClassification cmdlet enables or disables the category of updates, for example, security or critical, to be synchronized.

To use this cmdlet without filtering results, the Get-WsusClassification cmdlet must be run, then the results are passed it into this cmdlet.

To use this cmdlet with filtered results, the Get-WsusClassification cmdlet must be run, then results are filtered using the Where-Object cmdlet and passed into this cmdlet.

Examples

Example 1: Disable driver updates

PS C:\> Get-WsusClassification | Where-Object -FilterScript {$_.Classification.Title -Eq "Drivers"} | Set-WsusClassification -Disable

This command specifies that you do not want driver updates.

Parameters

-Classification

Specifies the classification of updates that are to be synchronized. If the Disable parameter is used, then this parameter specifies the classification of updates that are not to be synchronized. This parameter value is passed from the Get-WsusClassification cmdlet.

Parameter properties

Type:WsusClassification
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

-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

-Disable

Specifies that updates are not to be synchronized for the specified classification.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
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.

Inputs

Microsoft.UpdateServices.Commands.WsusClassification

Outputs

Object