This cmdlet creates a disk partition object to use with the Format and Partition Disk task sequence step. Use this cmdlet to define the partition settings, and then use that object with the -PartitionSetting parameter of the New-CMTSStepPartitionDisk or Set-CMTSStepPartitionDisk cmdlets.
You can create the following types of partition settings objects, based on the switch parameter that you use with this cmdlet:
PartitionPrimary: Primary partition
PartitionEfi EFI partition
PartitionExtended: Extended partition
PartitionHidden: Hidden partition
PartitionLogical: Logical partition
PartitionMsr: MSR partition
PartitionRecovery: Recovery partition
If you don't specify a partition switch parameter, the cmdlet creates a primary partition settings object.
Example 5: View the partition setting details for a step
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.
Then to view the first partition settings, reference the Partitions property, which is an array of SMS_TaskSequence_PartitionSettings objects.
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
(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
-EnableDriveLetterAssignment
Set this parameter to true to let Configuration Manager assign a drive letter to the partition.
Parameter properties
Type:
Boolean
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
PrimaryPartition
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-EnableQuickFormat
Set this parameter to true to let Configuration Manager do a quick format of the partition.
Parameter properties
Type:
Boolean
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
PrimaryPartition
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 (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
-IsBootPartition
Set this parameter to true to make this partition the boot partition.
Parameter properties
Type:
Boolean
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
PrimaryPartition
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 partition.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Aliases:
PartitionName, VolumeName
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-PartitionEfi
Add this parameter to make the partition type EFI.
Parameter properties
Type:
SwitchParameter
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
EfiPartition
Position:
Named
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-PartitionExtended
Add this parameter to make the partition type Extended.
Parameter properties
Type:
SwitchParameter
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
ExtendedPartition
Position:
Named
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-PartitionFileSystem
Specify the file system to format the partition.
Parameter properties
Type:
FileSystemType
Default value:
None
Accepted values:
Ntfs, Fat32
Supports wildcards:
False
DontShow:
False
Parameter sets
PrimaryPartition
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-PartitionHidden
Add this parameter to make the partition type Hidden.
Parameter properties
Type:
SwitchParameter
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
HiddenPartition
Position:
Named
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-PartitionLogical
Add this parameter to make the partition type Logical.
Parameter properties
Type:
SwitchParameter
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
LogicalPartition
Position:
Named
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-PartitionMsr
Add this parameter to make the partition type MSR.
Parameter properties
Type:
SwitchParameter
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
MsrPartition
Position:
Named
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-PartitionPrimary
Add this parameter to make the partition type Primary.
Parameter properties
Type:
SwitchParameter
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
PrimaryPartition
Position:
Named
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-PartitionRecovery
Add this parameter to make the partition type Recovery.
Parameter properties
Type:
SwitchParameter
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
RecoveryPartition
Position:
Named
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-Size
Specify an integer value for the size of the partition. Use this parameter with the -SizeUnit parameter. If -SizeUnit is Percent, then specify a number between 1-100 for this parameter. If -SizeUnit is MB or GB, specify a number for the specific partition size.
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
-SizeUnit
Specify the unit type for the size. Use this parameter with the -Size parameter.
Percent: Use -Size to set the partition to a percentage of remaining free space on the disk.
MB or GB: Use -Size to set a specific size for the partition.
Parameter properties
Type:
SizeUnitType
Default value:
None
Accepted values:
MB, GB, Percent
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
-Variable
By default, Configuration Manager assigns the next available drive letter to this partition. To save this drive letter for future use, set a custom task sequence variable with this parameter.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
PrimaryPartition
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.