Add-CMSoftwareUpdateToGroup

Adds a software update to a software update group in Configuration Manager.

Syntax

Add-CMSoftwareUpdateToGroup
   -SoftwareUpdateGroupId <String>
   -SoftwareUpdateId <String[]>
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Add-CMSoftwareUpdateToGroup
   -SoftwareUpdate <IResultObject[]>
   -SoftwareUpdateGroupId <String>
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Add-CMSoftwareUpdateToGroup
   -SoftwareUpdate <IResultObject[]>
   -SoftwareUpdateGroupName <String>
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Add-CMSoftwareUpdateToGroup
   -SoftwareUpdate <IResultObject[]>
   -SoftwareUpdateGroup <IResultObject>
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Add-CMSoftwareUpdateToGroup
   -SoftwareUpdateGroup <IResultObject>
   -SoftwareUpdateId <String[]>
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Add-CMSoftwareUpdateToGroup
   -SoftwareUpdateGroup <IResultObject>
   -SoftwareUpdateName <String[]>
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Add-CMSoftwareUpdateToGroup
   -SoftwareUpdateGroupId <String>
   -SoftwareUpdateName <String[]>
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Add-CMSoftwareUpdateToGroup
   -SoftwareUpdateGroupName <String>
   -SoftwareUpdateId <String[]>
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Add-CMSoftwareUpdateToGroup
   -SoftwareUpdateGroupName <String>
   -SoftwareUpdateName <String[]>
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

The Add-CMSoftwareUpdateToGroup cmdlet adds a software update to a software update group in Configuration Manager. You can specify a software update by name or by ID or use the Get-CMSoftwareUpdate cmdlet to obtain an update. Likewise, you can specify a software update group by name or by ID or use the Get-CMSoftwareUpdateGroup cmdlet to obtain one.

Note

Run Configuration Manager cmdlets from the Configuration Manager site drive, for example PS XYZ:\>. For more information, see getting started.

Examples

Example 1: Add an update to a software group

PS XYZ:\>Add-CMSoftwareUpdateToGroup -SoftwareUpdateGroupName "Accounting Group updates" -SoftwareUpdateId "SMS00078"

This command adds a software update with the ID SMS00078 to the update group named Accounting Group updates.

Example 2: Add an update to a software group by using IDs

PS XYZ:\>Add-CMSoftwareUpdateToGroup -SoftwareUpdateGroupId "SUP00045" -SoftwareUpdateId "SMS00078"

This command adds a software update that has the ID SMS00078 to the update group with the specified ID.

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

-DisableWildcardHandling

This parameter treats wildcard characters as literal character values. You can't combine it with ForceWildcardHandling.

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

-ForceWildcardHandling

This parameter processes wildcard characters and may lead to unexpected behavior (not recommended). You can't combine it with DisableWildcardHandling.

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

-SoftwareUpdate

Specifies a software update object. To obtain a software update object, use Get-CMSoftwareUpdate.

Type:IResultObject[]
Aliases:SoftwareUpdates
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-SoftwareUpdateGroup

Specifies a software update group object. To obtain a software update group object, use Get-CMSoftwareUpdateGroup.

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

-SoftwareUpdateGroupId

Specifies an ID of a software group.

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

-SoftwareUpdateGroupName

Specifies a name of a software group.

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

-SoftwareUpdateId

Specifies an ID of a software update.

Type:String[]
Aliases:SoftwareUpdateIds
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-SoftwareUpdateName

Specifies a name of a software update.

Type:String[]
Aliases:SoftwareUpdateNames
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:True

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet doesn't run.

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

Inputs

Microsoft.ConfigurationManagement.ManagementProvider.IResultObject[]

Microsoft.ConfigurationManagement.ManagementProvider.IResultObject

Outputs

System.Object