Edit

Share via


New-CMSoftwareUpdateAutoPhasedDeployment

Use this cmdlet to create a phased deployment for software updates by generating two phases with same settings.

Syntax

SearchByGroupMandatory

New-CMSoftwareUpdateAutoPhasedDeployment
    [-SoftwareUpdateGroup] <IResultObject>
    -Name <String>
    [-AddPhases <Phase[]>]
    [-BeginCondition <BeginConditionType>]
    [-CriteriaOption <CriteriaType>]
    [-CriteriaValue <Int32>]
    [-DaysAfterPreviousPhaseSuccess <Int32>]
    [-DeadlineUnit <TimeUnitType>]
    [-DeadlineValue <Int32>]
    [-FirstCollection <IResultObject>]
    [-FirstCollectionId <String>]
    [-FirstCollectionName <String>]
    [-InsertAtOrder <Int32>]
    [-InstallationChoice <InstallationChoiceType>]
    [-SecondCollection <IResultObject>]
    [-SecondCollectionId <String>]
    [-SecondCollectionName <String>]
    [-ThrottlingDays <Int32>]
    [-Description <String>]
    [-DisableWildcardHandling]
    [-ForceWildcardHandling]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

SearchByGroupIdMandatory

New-CMSoftwareUpdateAutoPhasedDeployment
    [-SoftwareUpdateGroupId] <String>
    -Name <String>
    [-AddPhases <Phase[]>]
    [-BeginCondition <BeginConditionType>]
    [-CriteriaOption <CriteriaType>]
    [-CriteriaValue <Int32>]
    [-DaysAfterPreviousPhaseSuccess <Int32>]
    [-DeadlineUnit <TimeUnitType>]
    [-DeadlineValue <Int32>]
    [-FirstCollection <IResultObject>]
    [-FirstCollectionId <String>]
    [-FirstCollectionName <String>]
    [-InsertAtOrder <Int32>]
    [-InstallationChoice <InstallationChoiceType>]
    [-SecondCollection <IResultObject>]
    [-SecondCollectionId <String>]
    [-SecondCollectionName <String>]
    [-ThrottlingDays <Int32>]
    [-Description <String>]
    [-DisableWildcardHandling]
    [-ForceWildcardHandling]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

SearchByGroupNameMandatory

New-CMSoftwareUpdateAutoPhasedDeployment
    [-SoftwareUpdateGroupName] <String>
    -Name <String>
    [-AddPhases <Phase[]>]
    [-BeginCondition <BeginConditionType>]
    [-CriteriaOption <CriteriaType>]
    [-CriteriaValue <Int32>]
    [-DaysAfterPreviousPhaseSuccess <Int32>]
    [-DeadlineUnit <TimeUnitType>]
    [-DeadlineValue <Int32>]
    [-FirstCollection <IResultObject>]
    [-FirstCollectionId <String>]
    [-FirstCollectionName <String>]
    [-InsertAtOrder <Int32>]
    [-InstallationChoice <InstallationChoiceType>]
    [-SecondCollection <IResultObject>]
    [-SecondCollectionId <String>]
    [-SecondCollectionName <String>]
    [-ThrottlingDays <Int32>]
    [-Description <String>]
    [-DisableWildcardHandling]
    [-ForceWildcardHandling]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

SearchByIdMandatory

New-CMSoftwareUpdateAutoPhasedDeployment
    [-SoftwareUpdateIds] <String[]>
    -Name <String>
    [-AddPhases <Phase[]>]
    [-BeginCondition <BeginConditionType>]
    [-CriteriaOption <CriteriaType>]
    [-CriteriaValue <Int32>]
    [-DaysAfterPreviousPhaseSuccess <Int32>]
    [-DeadlineUnit <TimeUnitType>]
    [-DeadlineValue <Int32>]
    [-FirstCollection <IResultObject>]
    [-FirstCollectionId <String>]
    [-FirstCollectionName <String>]
    [-InsertAtOrder <Int32>]
    [-InstallationChoice <InstallationChoiceType>]
    [-SecondCollection <IResultObject>]
    [-SecondCollectionId <String>]
    [-SecondCollectionName <String>]
    [-ThrottlingDays <Int32>]
    [-Description <String>]
    [-DisableWildcardHandling]
    [-ForceWildcardHandling]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

SearchByNameMandatory

New-CMSoftwareUpdateAutoPhasedDeployment
    [-SoftwareUpdateNames] <String[]>
    -Name <String>
    [-AddPhases <Phase[]>]
    [-BeginCondition <BeginConditionType>]
    [-CriteriaOption <CriteriaType>]
    [-CriteriaValue <Int32>]
    [-DaysAfterPreviousPhaseSuccess <Int32>]
    [-DeadlineUnit <TimeUnitType>]
    [-DeadlineValue <Int32>]
    [-FirstCollection <IResultObject>]
    [-FirstCollectionId <String>]
    [-FirstCollectionName <String>]
    [-InsertAtOrder <Int32>]
    [-InstallationChoice <InstallationChoiceType>]
    [-SecondCollection <IResultObject>]
    [-SecondCollectionId <String>]
    [-SecondCollectionName <String>]
    [-ThrottlingDays <Int32>]
    [-Description <String>]
    [-DisableWildcardHandling]
    [-ForceWildcardHandling]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

SearchByValueMandatory

New-CMSoftwareUpdateAutoPhasedDeployment
    [-SoftwareUpdates] <IResultObject[]>
    -Name <String>
    [-AddPhases <Phase[]>]
    [-BeginCondition <BeginConditionType>]
    [-CriteriaOption <CriteriaType>]
    [-CriteriaValue <Int32>]
    [-DaysAfterPreviousPhaseSuccess <Int32>]
    [-DeadlineUnit <TimeUnitType>]
    [-DeadlineValue <Int32>]
    [-FirstCollection <IResultObject>]
    [-FirstCollectionId <String>]
    [-FirstCollectionName <String>]
    [-InsertAtOrder <Int32>]
    [-InstallationChoice <InstallationChoiceType>]
    [-SecondCollection <IResultObject>]
    [-SecondCollectionId <String>]
    [-SecondCollectionName <String>]
    [-ThrottlingDays <Int32>]
    [-Description <String>]
    [-DisableWildcardHandling]
    [-ForceWildcardHandling]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

Use this cmdlet to create a phased deployment for software updates by generating two phases with same settings. This cmdlet's behavior is the same as the Create Phased Deployment wizard on a software update, when you select the option to Automatically create a default two phase deployment.

Note

Before you create a phased deployment, make sure to distribute the software update content to a distribution point.

Examples

Example 1: Create a deployment by update name

This example creates a new software update phased deployment named myDPName for the software update myUpdateName.

New-CMSoftwareUpdateAutoPhasedDeployment -SoftwareUpdateName "myUpdateName" -Name "myPDName" -FirstCollectionID "SMSDM001" -SecondCollectionID "SMSDM003" -CriteriaOption Compliance -CriteriaValue 1 -BeginCondition AfterPeriod -DaysAfterPreviousPhaseSuccess 2 -ThrottlingDays 3 -InstallationChoice AfterPeriod -DeadlineUnit Hours -DeadlineValue 4 -Description "MyDescription"

Example 2: Create a deployment by input update object

This example creates a new software update phased deployment named myPDName for a piped software update object.

$myUpdate | New-CMSoftwareUpdateAutoPhasedDeployment -Name "myPDName" -FirstCollectionID "SMSDM001" -SecondCollectionID "SMSDM003" -CriteriaOption Compliance -CriteriaValue 1 -BeginCondition AfterPeriod -DaysAfterPreviousPhaseSuccess 2 -ThrottlingDays 3 -InstallationChoice AfterPeriod -DeadlineUnit Hours -DeadlineValue 4 -Description "MyDescription"

Parameters

-AddPhases

This cmdlet automatically creates two phases for the specified two collections. You can also add more phases with this parameter. Specify an array of phases. Use New-CMSoftwareUpdatePhase to create the phases.

Parameter properties

Type:

Phase[]

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

-BeginCondition

Specify an option for beginning the second phase of deployment after success of the first phase:

  • AfterPeriod: This parameter is the same as the following setting on the Settings page of the Create Phased Deployment wizard in the console: Automatically begin this phase after a deferral period (in days). If you specify this value, use DaysAfterPreviousPhaseSuccess to configure the period of time.

  • Manually: This parameter is the same as the following setting on the Settings page of the Create Phased Deployment wizard in the console: Manually begin the second phase deployment.

Parameter properties

Type:BeginConditionType
Default value:None
Accepted values:AfterPeriod, Manually
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

-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

-CriteriaOption

Specify an option to choose the criteria for success of the first phase:

  • Compliance: This parameter is the same as the following setting on the Settings page of the Create Phased Deployment wizard in the console: Deployment success percentage. Specify the percentage value with the CriteriaValue parameter.

  • Number: This parameter is the same as the following setting on the Settings page of the Create Phased Deployment wizard in the console: Number of devices successfully deployed. Specify the number of devices with the CriteriaValue parameter.

Parameter properties

Type:CriteriaType
Default value:None
Accepted values:Compliance, Number
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

-CriteriaValue

This integer value depends upon the value that you specify for CriteriaOption:

  • Compliance: Specify the percentage

  • Number: Specify the number of devices

Parameter properties

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

-DaysAfterPreviousPhaseSuccess

Specify an integer value for the number of days after success of the first phase to begin the second phase. This parameter is the same as the following setting on the Settings page of the Create Phased Deployment wizard in the console: Automatically begin this phase after a deferral period (in days).

Parameter properties

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

-DeadlineUnit

Specify the type of deadline period. Use this parameter with DeadlineValue.

Parameter properties

Type:TimeUnitType
Default value:None
Accepted values:Hours, Days, Weeks, Months
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

-DeadlineValue

This parameter is only used if you specify AfterPeriod with the InstallationChoice parameter.

Specify an integer value for the period of time for the deadline. Use the DeadlineUnit parameter to specify the type of period: Hours, Days, Weeks, Months. This parameter is the same as the following setting on the Settings page of the Create Phased Deployment wizard in the console: Installation is required after this period of time.

Parameter properties

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

-Description

Specify a description for the software update phased deployment.

Parameter properties

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

-DisableWildcardHandling

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

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

-FirstCollection

Specify a collection object for the first phase.

Parameter properties

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

-FirstCollectionId

Specify a collection ID for the first phase.

Parameter properties

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

-FirstCollectionName

Specify a collection name for the first phase.

Parameter properties

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

-ForceWildcardHandling

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

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

-InsertAtOrder

If you use the AddPhases parameter, use this parameter to determine where in the order of phases to insert the additional phases. Specify an integer with the order number.

Parameter properties

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

-InstallationChoice

Specify an option for the behavior relative to when the software is made available:

  • AsSoonAsPossible: This parameter is the same as the following setting on the Settings page of the Create Phased Deployment wizard in the console: Installation is required as soon as possible.

  • AfterPeriod: This parameter is the same as the following setting on the Settings page of the Create Phased Deployment wizard in the console: Installation is required after this period of time. If you specify this value, use DeadlineUnit and DeadlineValue to configure the period of time.

Parameter properties

Type:InstallationChoiceType
Default value:None
Accepted values:AsSoonAsPossible, AfterPeriod
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

-Name

Specify a name for the application phased deployment.

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

-SecondCollection

Specify a collection object for the second phase.

Parameter properties

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

-SecondCollectionId

Specify a collection ID for the second phase.

Parameter properties

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

-SecondCollectionName

Specify a collection name for the second phase.

Parameter properties

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

-SoftwareUpdateGroup

Specify an object for the software update group.

Parameter properties

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

Parameter sets

SearchByGroupMandatory
Position:0
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-SoftwareUpdateGroupId

Specify the software update group by ID.

Parameter properties

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

Parameter sets

SearchByGroupIdMandatory
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SoftwareUpdateGroupName

Specify the software update group by name.

Parameter properties

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

Parameter sets

SearchByGroupNameMandatory
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SoftwareUpdateIds

Specify an array of software update IDs.

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

SearchByIdMandatory
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SoftwareUpdateNames

Specify an array of software update names.

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

SearchByNameMandatory
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SoftwareUpdates

Specify an array of software update objects.

Parameter properties

Type:

IResultObject[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

SearchByValueMandatory
Position:0
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-ThrottlingDays

Specify an integer value for the number of days to gradually make this software available. This parameter is the same as the following setting on the Settings page of the Create Phased Deployment wizard in the console: Gradually make this software available over this period of time (in days).

Parameter properties

Type:Int32
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 doesn't 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.ConfigurationManagement.ManagementProvider.IResultObject

Microsoft.ConfigurationManagement.ManagementProvider.IResultObject

Outputs

IResultObject