Compartilhar via


Format

Applies To: Windows 7, Windows 8, Windows 8.1, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, Windows Vista

Format specifies whether to erase the partition, and which file system to apply to the partition.

Values

NTFS

Formats the partition for the NTFS file system.

When CreatePartition\Type is set to Primary or Logical, this is the default file format.

FAT32

Formats the partition for the File Allocation Table (FAT) file system.

When CreatePartition\Type is set to EFI, this is the default file format.

When CreatePartition\Type is set to Extended or MSR, the partition does not receive a file format.

When using a disk that already contains an existing partition structure, Format can be used to erase and reformat an existing partition. By default, if an existing partition structure is used, the existing partition is not erased or reformatted.

Valid Configuration Passes

windowsPE

Parent Hierarchy

Microsoft-Windows-Setup | DiskConfiguration | Disk | ModifyPartitions | ModifyPartition | Format

Applies To

For a list of the supported Windows® editions and architectures that this component supports, see Microsoft-Windows-Setup.

XML Examples

The following XML output for the DiskConfiguration settings shows how to erase and reformat the second partition of a disk.

<DiskConfiguration>

  <Disk wcm:action="add">
    <DiskID>0</DiskID> 

      <ModifyPartition wcm:action="add">
        <Order>1</Order> 
        <PartitionID>2</PartitionID> 
        <Format>NTFS</Format> 
      </ModifyPartition>
    </ModifyPartitions>

</DiskConfiguration>

For full XML examples and recommended partition configurations, see How to Configure UEFI/GPT-Based Hard Disk Partitions or How to Configure BIOS/MBR-Based Hard Disk Partitions.

See Also

Concepts

ModifyPartition