New-CMTaskSequenceManualPhasedDeployment

Create a phased deployment for a task sequence.

Syntax

New-CMTaskSequenceManualPhasedDeployment
   [-TaskSequence] <IResultObject>
   -AddPhases <Phase[]>
   [-Description <String>]
   -Name <String>
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-CMTaskSequenceManualPhasedDeployment
   [-TaskSequenceId] <String>
   -AddPhases <Phase[]>
   [-Description <String>]
   -Name <String>
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-CMTaskSequenceManualPhasedDeployment
   [-TaskSequenceName] <String>
   -AddPhases <Phase[]>
   [-Description <String>]
   -Name <String>
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

Use this cmdlet to create a phased deployment for a task sequence. Before you use this cmdlet, add new customized deployment phases with the cmdlet New-CMTaskSequencePhase.

For more information, see Create phased deployments with Configuration Manager.

Note

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

Examples

Example 1: Create a deployment for a task sequence by name

This example creates a two-phase deployment named phaseDeployment for the task sequence myTaskSequence.

$phase1 = New-CMTaskSequencePhase -CollectionId "SMSDM001" -PhaseName "test01" -UserNotification DisplayAll
$phase2 = New-CMTaskSequencePhase -CollectionId "SMSDM003" -PhaseName "test02" -UserNotification HideAll
New-CMTaskSequenceManualPhasedDeployment -TaskSequenceName "myTaskSequence" -Name "phasedDeployment" -AddPhases ($phase1, $phase2)

Example 2: Create a deployment for a task sequence object

This example creates a two-phase deployment named phasedDeployment for a piped task sequence object.

$phase3 = New-CMTaskSequencePhase -CollectionId "SMSDM001" -PhaseName "test03" -UserNotification DisplayAll
$phase4 = New-CMTaskSequencePhase -CollectionId "SMSDM003" -PhaseName "test04" -UserNotification HideAll
$myTaskSequence | New-CMTaskSequenceManualPhasedDeployment -Name "phasedDeployment" -AddPhases ($phase3, $phase4)

Parameters

-AddPhases

Specify an array of phases. Use New-CMTaskSequencePhase to create the phases.

Type:Phase[]
Position:Named
Default value:None
Required:True
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

-Description

Specify a description for the task sequence phased deployment.

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

-Name

Specify a name for the task sequence phased deployment.

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

-TaskSequence

Specify a task sequence object. To get this object, use the Get-CMTaskSequence cmdlet.

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

-TaskSequenceId

Specify a task sequence by ID.

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

-TaskSequenceName

Specify a task sequence by name.

Type:String
Position:0
Default value:None
Required:True
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

Inputs

Microsoft.ConfigurationManagement.ManagementProvider.IResultObject

Outputs

IResultObject

Notes

The return object is the SMS_PhasedDeployment server WMI class.