Set-CMTaskSequencePhase

Use this cmdlet to configure a deployment phase for a task sequence.

Syntax

Set-CMTaskSequencePhase
   [-AllowFallback <Boolean>]
   [-AllowRemoteDP <Boolean>]
   [-AllowSystemRestart <Boolean>]
   [-Comments <String>]
   [-DeploymentOption <DeploymentOptionType>]
   [-PreDownload <Boolean>]
   [-SoftwareInstallation <Boolean>]
   [-UserNotification <UserNotificationType>]
   [-WriteFilterCommit <Boolean>]
   [-BeginCondition <BeginConditionType>]
   [-CriteriaOption <CriteriaType>]
   [-CriteriaValue <Int32>]
   [-DaysAfterPreviousPhaseSuccess <Int32>]
   [-DeadlineUnit <TimeUnitType>]
   [-DeadlineValue <Int32>]
   [-InstallationChoice <InstallationChoiceType>]
   [-MovePhase <ReorderType>]
   [-MoveToOrder <Int32>]
   [-NewCollection <IResultObject>]
   [-NewCollectionId <String>]
   [-NewCollectionName <String>]
   [-NewPhaseName <String>]
   [-ThrottlingDays <Int32>]
   [-Collection <IResultObject>]
   [-CollectionId <String>]
   [-CollectionName <String>]
   [-Id <String>]
   [-InputObject] <IResultObject>
   [-Name <String>]
   [-Order <Int32>]
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-CMTaskSequencePhase
   [-AllowFallback <Boolean>]
   [-AllowRemoteDP <Boolean>]
   [-AllowSystemRestart <Boolean>]
   [-Comments <String>]
   [-DeploymentOption <DeploymentOptionType>]
   [-PreDownload <Boolean>]
   [-SoftwareInstallation <Boolean>]
   [-UserNotification <UserNotificationType>]
   [-WriteFilterCommit <Boolean>]
   [-BeginCondition <BeginConditionType>]
   [-CriteriaOption <CriteriaType>]
   [-CriteriaValue <Int32>]
   [-DaysAfterPreviousPhaseSuccess <Int32>]
   [-DeadlineUnit <TimeUnitType>]
   [-DeadlineValue <Int32>]
   [-InstallationChoice <InstallationChoiceType>]
   [-MovePhase <ReorderType>]
   [-MoveToOrder <Int32>]
   [-NewCollection <IResultObject>]
   [-NewCollectionId <String>]
   [-NewCollectionName <String>]
   [-NewPhaseName <String>]
   [-ThrottlingDays <Int32>]
   [-Collection <IResultObject>]
   [-CollectionId <String>]
   [-CollectionName <String>]
   [-Id <String>]
   [-Name <String>]
   [-Order <Int32>]
   [-PhasedDeploymentId] <String>
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-CMTaskSequencePhase
   [-AllowFallback <Boolean>]
   [-AllowRemoteDP <Boolean>]
   [-AllowSystemRestart <Boolean>]
   [-Comments <String>]
   [-DeploymentOption <DeploymentOptionType>]
   [-PreDownload <Boolean>]
   [-SoftwareInstallation <Boolean>]
   [-UserNotification <UserNotificationType>]
   [-WriteFilterCommit <Boolean>]
   [-BeginCondition <BeginConditionType>]
   [-CriteriaOption <CriteriaType>]
   [-CriteriaValue <Int32>]
   [-DaysAfterPreviousPhaseSuccess <Int32>]
   [-DeadlineUnit <TimeUnitType>]
   [-DeadlineValue <Int32>]
   [-InstallationChoice <InstallationChoiceType>]
   [-MovePhase <ReorderType>]
   [-MoveToOrder <Int32>]
   [-NewCollection <IResultObject>]
   [-NewCollectionId <String>]
   [-NewCollectionName <String>]
   [-NewPhaseName <String>]
   [-ThrottlingDays <Int32>]
   [-Collection <IResultObject>]
   [-CollectionId <String>]
   [-CollectionName <String>]
   [-Id <String>]
   [-Name <String>]
   [-Order <Int32>]
   [-PhasedDeploymentName] <String>
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

Applies to version 2006 and later. Use this cmdlet to configure a deployment phase for a task sequence. For more information, see Create phased deployments.

Examples

Example 1: Change the collection

This example changes the collection for the second phase in the task sequence phased deployment passed through on the command line.

$phasedDeployment = Get-CMTaskSequencePhasedDeployment -Name "myPhasedDeployment"

$phasedDeployment | Set-CMTaskSequencePhase -Order 2 -NewCollectionId "XYZ00227"

Example 2: Move a phase up

This example moves a phase up in the order. It selects the phased deployment by its ID, and selects the phase by the associated collection ID.

Set-CMTaskSequencePhase -PhasedDeploymentId "0bc464d9-e7dd-44c1-a157-3f8be6a79c03" -CollectionId "XYZ00227" -MovePhase MoveUp

Example 3: Configure phase settings

This example changes the configuration settings for the selected phase.

Set-CMTaskSequencePhase -PhasedDeploymentName "myPhasedDeployment" -Name "phase1" -UserNotification HideAll -SoftwareInstallation $true -AllowSystemRestart $true -WriteFilterCommit $false -PreDownload $true -Comments "phase 1 comment" -DeploymentOption DownloadAllContentLocallyBeforeStartingTaskSequence -AllowRemoteDP $true -AllowFallback $false -CriteriaOption Compliance -CriteriaValue 90 -BeginCondition AfterPeriod -DaysAfterPreviousPhaseSuccess 3 -ThrottlingDays 5 -InstallationChoice AfterPeriod -DeadlineUnit Hours -DeadlineValue 12

Parameters

-AllowFallback

This parameter is the same as the following setting on the Distribution Points page of the Add Phase Wizard in the console: Allow clients to use distribution points from the default site boundary group.

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

-AllowRemoteDP

This parameter is the same as the following setting on the Distribution Points page of the Add Phase Wizard in the console: When no local distribution point is available, use a remote distribution point.

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

-AllowSystemRestart

This parameter is the same as the following setting on the User Experience page of the Add Phase Wizard in the console: System restart (if required to complete installation). This setting applies when the installation deadline is reached, to allow this activity to be performed outside the maintenance window.

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

-BeginCondition

Specify an option for beginning this phase of deployment after success of the previous phase:

  • AfterPeriod: This parameter is the same as the following setting on the Phase Settings page of the Add Phase 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 Phase Settings page of the Add Phase Wizard in the console: Manually begin this phase of deployment.

Type:BeginConditionType
Accepted values:AfterPeriod, Manually
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Collection

Specify an object for the target collection

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

-CollectionId

Specify the target collection by ID.

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

-CollectionName

Specify the target collection by name.

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

-Comments

Specify optional comments for this phase. The maximum length is 512 characters.

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

-Confirm

Prompts you for confirmation before running the cmdlet.

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

-CriteriaOption

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

  • Compliance: This parameter is the same as the following setting on the Phase Settings page of the Add Phase 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 Phase Settings page of the Add Phase Wizard in the console: Number of devices successfully deployed. Specify the number of devices with the CriteriaValue parameter.

Type:CriteriaType
Accepted values:Compliance, Number
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-CriteriaValue

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

  • Compliance: Specify the percentage

  • Number: Specify the number of devices

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

-DaysAfterPreviousPhaseSuccess

Specify an integer value for the number of days after success of the previous phase to begin this phase. This parameter is the same as the following setting on the Phase Settings page of the Add Phase Wizard in the console: Automatically begin this phase after a deferral period (in days).

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

-DeadlineUnit

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

Type:TimeUnitType
Accepted values:Hours, Days, Weeks, Months
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters: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 Phase Settings page of the Add Phase Wizard in the console: Installation is required after this period of time.

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

-DeploymentOption

This parameter is the same as the following setting on the Distribution Points page of the Add Phase Wizard in the console: Select the deployment option to use when a client uses a distribution point from a neighbor boundary group or the default site boundary group. It accepts the following values:

  • DownloadContentLocallyWhenNeededByRunningTaskSequence: Download content locally when needed by the running task sequence
  • DownloadAllContentLocallyBeforeStartingTaskSequence: Download all content locally before starting task sequence
Type:DeploymentOptionType
Accepted values:DownloadContentLocallyWhenNeededByRunningTaskSequence, DownloadAllContentLocallyBeforeStartingTaskSequence
Position:Named
Default value:None
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. It's 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

-Id

Specify the ID of the phase to configure.

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

-InputObject

Specify a phased deployment object that includes the phase to configure.

Type:IResultObject
Aliases:PhasedDeployment
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters: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 Phase Settings page of the Add Phase Wizard in the console: Installation is required as soon as possible.

  • AfterPeriod: This parameter is the same as the following setting on the Phase Settings page of the Add Phase 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.

Type:InstallationChoiceType
Accepted values:AsSoonAsPossible, AfterPeriod
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-MovePhase

Change the order for the selected phase. You can move it up one, move it down one, or move to a specific index. If you specify MoveToOrder, use the -MoveToOrder parameter to set the specific index.

Type:ReorderType
Accepted values:MoveUp, MoveDown, MoveToOrder
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-MoveToOrder

When you set the -MovePhase parameter to MoveToOrder, use this parameter to set the specific index.

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

-Name

Specify the name of the phase to configure.

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

-NewCollection

Specify a collection object to use as the new target for the selected phase.

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

-NewCollectionId

Specify a collection by ID to use as the new target for the selected phase.

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

-NewCollectionName

Specify a collection by name to use as the new target for the selected phase.

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

-NewPhaseName

Use this parameter to rename the selected phase.

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

-Order

Specify the index of the phase to configure.

Type:Int32
Aliases:PhaseOrder
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-PhasedDeploymentId

Select the phased deployment by ID. Then use other parameters to select the specific phase in that deployment.

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

-PhasedDeploymentName

Select the phased deployment by name. Then use other parameters to select the specific phase in that deployment.

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

-PreDownload

This parameter is the same as the following setting on the General page of the Add Phase Wizard in the console: Pre-download content for this task sequence.

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

-SoftwareInstallation

This parameter is the same as the following setting on the User Experience page of the Add Phase Wizard in the console: Software Installation. This setting applies when the installation deadline is reached, to allow this activity to be performed outside the maintenance window.

Type:Boolean
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters: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 Phase Settings page of the Add Phase Wizard in the console: Gradually make this software available over this period of time (in days).

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

-UserNotification

This parameter is the same as the following setting on the User Experience page of the Add Phase Wizard in the console: Specify user experience setting for this deployment with the following values:

  • DisplayAll: Display in Software Center and show all notifications
  • HideAll: Hide in Software Center and all notifications
Type:UserNotificationType
Accepted values:DisplayAll, HideAll
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

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

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

-WriteFilterCommit

This parameter is the same as the following setting on the User Experience page of the Add Phase Wizard in the console: Commit changes at deadline or during a maintenance window (requires restart). This setting applies to write filter handling for Windows Embedded devices.

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

Inputs

Microsoft.ConfigurationManagement.ManagementProvider.IResultObject

Outputs

IResultObject