Edit

Share via


Set-WsusDynamicCategory

Sets the synchronization status of a dynamic category.

Syntax

ByName

Set-WsusDynamicCategory
    -Name <String>
    -DynamicCategoryType <DynamicCategoryType>
    -Status <WsusDynamicCategoryStatus>
    [-UpdateServer <IUpdateServer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

ByObject

Set-WsusDynamicCategory
    -InputObject <IDynamicCategory>
    [-UpdateServer <IUpdateServer>]
    [-Status <WsusDynamicCategoryStatus>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

The Set-WsusDynamicCategory cmdlet sets the synchronization status of a dynamic category in a specified Windows Server Update Services (WSUS) server.

Examples

Example 1: Set the synchronization status of a dynamic category

PS C:\> Get-WsusDynamicCategory -DynamicCategoryType Device -Name "PCI/Device07" | Set-WsusDynamicCategory -Status Blocked

This command gets a dynamic category from the local server by using the Get-WsusDynamicCategory cmdlet. The command passes the dynamic category to the current cmdlet by using the pipeline operator. The current cmdlet sets the synchronization status to Blocked. This value means that no updates are synchronized for this dynamic category.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:None
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

-DynamicCategoryType

Specifies the type of the dynamic category that this cmdlet modifies. The acceptable values for this parameter are:

  • ComputerModel
  • Device
  • Application

Parameter properties

Type:DynamicCategoryType
Default value:None
Accepted values:ComputerModel, Device, Application, Any
Supports wildcards:False
DontShow:False
Aliases:Type

Parameter sets

ByName
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-InputObject

Specifies a dynamic category object. This cmdlet modifies the synchronization settings for the dynamic category that this parameter specifies. To obtain a dynamic category, use the Get-WsusDynamicCategory cmdlet.

Parameter properties

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

Parameter sets

ByObject
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-Name

Specifies the name of the dynamic category to modify.

Parameter properties

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

Parameter sets

ByName
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Status

Specifies the update synchronization status for the dynamic category. The acceptable values for this parameter are:

  • Blocked. No updates are being synchronized for this dynamic category.
  • SyncUpdates. Updates are being synchronized for this dynamic category.

Parameter properties

Type:WsusDynamicCategoryStatus
Default value:None
Accepted values:Blocked, InventoryOnly, SyncUpdates
Supports wildcards:False
DontShow:False

Parameter sets

ByName
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-UpdateServer

Specifies a WSUS server. This cmdlet modifies a dynamic category on the server that this parameter specifies. To obtain a server, use the Get-WsusServer cmdlet. If you do not specify a value for this parameter, the cmdlet modifies dynamic categories on the local server.

Parameter properties

Type:IUpdateServer
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:None
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.Administration.IDynamicCategory

Outputs

Object