Set-WsusProduct

Sets whether the product representing the category of updates to synchronize is enabled.

Syntax

Set-WsusProduct
   -Product <WsusProduct>
   [-Disable]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

The Set-WsusProduct cmdlet enables or disables the product representing the category of updates to synchronize. In order to use this cmdlet, the Get-WsusProduct cmdlet must be run with its results passed into this cmdlet. You can run the Where-Object cmdlet to filter results.

Examples

Example 1: Specify updates for a product

PS C:\> Get-WsusServer | Get-WsusProduct | Where-Object -FilterScript {$_.product.title -Eq "Antigen"} | Set-WsusProduct

This command specifies that you want updates for the Antigen product.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

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

-Disable

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

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

-Product

Specifies the product for which the updates are to be synchronized. If the Disable parameter is used, then this parameter specifies the product for which the updates are not to be synchronized. This parameter value is passed from the Get-WsusProduct cmdlet.

Type:WsusProduct
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-WhatIf

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

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

Inputs

None

Outputs

None