Get-CMTaskSequenceStepCondition

Get a condition on a task sequence step.

Syntax

Get-CMTaskSequenceStepCondition
   -InputObject <IResultObject>
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [<CommonParameters>]

Description

Use this cmdlet to get a condition on a task sequence step. The task sequence evaluates the condition before it runs the step or group. For more information, see How to use task sequence variables.

Note

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

Examples

Example 1: Get a default condition

This example shows how to get the default condition on the Post-Processing group of an in-place upgrade task sequence.

$tsname = "Default IPU"
$tsgroup = "Post-Processing"
$ts = Get-CMTaskSequence -Name $tsname

$ts | Get-CMTaskSequenceGroup -StepName $tsgroup | Get-CMTaskSequenceStepCondition

SmsProviderObjectPath : SMS_TaskSequence_VariableConditionExpression
Operator              : equals
Value                 : false
Variable              : _SMSTSSetupRollback

Parameters

-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

-InputObject

Specify a task sequence group or step object. To get this object, use the Get-CMTaskSequenceGroup or Get-CMTaskSequenceStep cmdlets.

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

Inputs

Microsoft.ConfigurationManagement.ManagementProvider.IResultObject

Outputs

IResultObject[]

IResultObject

Notes

For more information on this return object and its properties, see SMS_TaskSequence_Condition server WMI class.