Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
Get-CMTSStepPartitionDisk
- Module:
- ConfigurationManager Module
Get the Format and Partition Disk step from a specific task sequence.
Syntax
ByValue (Default)
Get-CMTSStepPartitionDisk
[-InputObject] <IResultObject>
[-StepName <String>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
ById
Get-CMTSStepPartitionDisk
[-TaskSequenceId] <String>
[-StepName <String>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
ByName
Get-CMTSStepPartitionDisk
[-TaskSequenceName] <String>
[-StepName <String>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Use this cmdlet to get a task sequence step object for one or more instances of the Format and Partition Disk step. You can use this object to:
- Remove the step from a task sequence with Remove-CMTSStepPartitionDisk
- Copy the step to another task sequence with Add-CMTaskSequenceStep
For more information on this step, see About task sequence steps: Format and Partition Disk.
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 the step from a task sequence
This example first gets a task sequence object in the $tsOsd variable. It then passes that variable as the input object to get the Format and Partition Disk step.
$tsNameOsd = "Default OS deployment"
$tsOsd = Get-CMTaskSequence -Name $tsNameOsd -Fast
$tsStepNameFormatDisk = "Partition Disk 0 - UEFI"
$tsStepFormatDisk = Get-CMTSStepPartitionDisk -InputObject $tsOsd -StepName $tsStepNameFormatDisk
Example 2: View the partition setting details for a step
This example builds on the previous example. To view the first partition settings, reference the Partitions property, which is an array of SMS_TaskSequence_PartitionSettings objects.
$tsStepFormatDisk = Get-CMTSStepPartitionDisk -InputObject $tsOsd -StepName $tsStepNameFormatDisk
$tsStepFormatDisk.Partitions[0]
You can use this process to copy partition settings between steps or task sequences. Save this partition settings object as a variable and then add it to another step.
Parameters
-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
-InputObject
Specify a task sequence object from which to get the Format and Partition Disk step. To get this object, use the Get-CMTaskSequence cmdlet.
Parameter properties
| Type: | IResultObject |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | TaskSequence |
Parameter sets
-StepName
Specify the name of the Format and Partition Disk step to get from the task sequence.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-TaskSequenceId
Specify the package ID of the task sequence from which to get the Format and Partition Disk step. This value is a standard package ID, for example XYZ00858.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | Id, TaskSequencePackageId |
Parameter sets
-TaskSequenceName
Specify the name of the task sequence from which to get the Format and Partition Disk step.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-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
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
Outputs
System.Object
Related Links
Feedback
Was this page helpful?
