PDQ.com mobilePDQ.com desktop
Support

Format-Volume

Formats one or more existing volumes or a new volume on an existing partition.
Format-Volume [-DriveLetter*] <Char[]> [-AllocationUnitSize <UInt32>] [-CimSession <CimSession[]>] [-Compress][-DisableHeatGathering] [-FileSystem {FAT | FAT32 | exFAT | NTFS | ReFS}] [-Force] [-Full] [-IsDAX][-NewFileSystemLabel <String>] [-SetIntegrityStreams <Boolean>] [-ShortFileNameSupport <Boolean>] [-ThrottleLimit<Int32>] [-UseLargeFRS] [-Confirm] [-WhatIf] [<CommonParameters>]
Format-Volume [-AllocationUnitSize <UInt32>] [-CimSession <CimSession[]>] [-Compress] [-DisableHeatGathering][-FileSystem {FAT | FAT32 | exFAT | NTFS | ReFS}] [-Force] [-Full] [-IsDAX] [-NewFileSystemLabel <String>][-Partition <CimInstance>] [-SetIntegrityStreams <Boolean>] [-ShortFileNameSupport <Boolean>] [-ThrottleLimit<Int32>] [-UseLargeFRS] [-Confirm] [-WhatIf] [<CommonParameters>]
Format-Volume [-AllocationUnitSize <UInt32>] [-CimSession <CimSession[]>] [-Compress] [-DisableHeatGathering][-FileSystem {FAT | FAT32 | exFAT | NTFS | ReFS}] [-Force] [-Full] [-IsDAX] [-NewFileSystemLabel <String>][-SetIntegrityStreams <Boolean>] [-ShortFileNameSupport <Boolean>] [-ThrottleLimit <Int32>] [-UseLargeFRS]-FileSystemLabel* <String[]> [-Confirm] [-WhatIf] [<CommonParameters>]
Format-Volume [-AllocationUnitSize <UInt32>] [-CimSession <CimSession[]>] [-Compress] [-DisableHeatGathering][-FileSystem {FAT | FAT32 | exFAT | NTFS | ReFS}] [-Force] [-Full] [-IsDAX] [-NewFileSystemLabel <String>][-SetIntegrityStreams <Boolean>] [-ShortFileNameSupport <Boolean>] [-ThrottleLimit <Int32>] [-UseLargeFRS][-Confirm] [-WhatIf] [<CommonParameters>]
Format-Volume [-AllocationUnitSize <UInt32>] [-CimSession <CimSession[]>] [-Compress] [-DisableHeatGathering][-FileSystem {FAT | FAT32 | exFAT | NTFS | ReFS}] [-Force] [-Full] [-IsDAX] [-NewFileSystemLabel <String>][-SetIntegrityStreams <Boolean>] [-ShortFileNameSupport <Boolean>] [-ThrottleLimit <Int32>] [-UseLargeFRS] -Path*<String[]> [-Confirm] [-WhatIf] [<CommonParameters>]
Format-Volume [-AllocationUnitSize <UInt32>] [-CimSession <CimSession[]>] [-Compress] [-DisableHeatGathering][-FileSystem {FAT | FAT32 | exFAT | NTFS | ReFS}] [-Force] [-Full] [-IsDAX] [-NewFileSystemLabel <String>][-SetIntegrityStreams <Boolean>] [-ShortFileNameSupport <Boolean>] [-ThrottleLimit <Int32>] [-UseLargeFRS]-ObjectId* <String[]> [-Confirm] [-WhatIf] [<CommonParameters>]

The Format-Volume cmdlet formats one or more existing volumes, or a new volume on an existing partition. This cmdlet returns the object representing the volume that was just formatted, with all properties updated to reflect the format operation.

To create a new volume, use this cmdlet in conjunction with the Initialize-Disk and New-Partition cmdlets.

Parameters

-AllocationUnitSize [<UInt32>]

Specifies the allocation unit size to use when formatting the volume.

-CimSession [<CimSession[]>]

Runs the cmdlet in a remote session or on a remote computer. Enter a computer name or a session object, such as the output of a New-CimSession or Get-CimSession cmdlet. The default is the current session on the local computer.

-Compress [<SwitchParameter>]

Enables compression on all files and folders created on the specified NTFS volume.

-DisableHeatGathering [<SwitchParameter>]

Indicates that the cmdlet does not gather file activity on the specified tiered volume. You can override file placement based on the desired storage tier. This parameter is only valid for tiered volumes.

-DriveLetter <Char[]>

Specifies the drive letter of the volume to format.

-FileSystem [<String>]

Specifies the file system with which to format the volume. The acceptable values for this parameter are:NTFS, ReFS, exFAT, FAT32, and FAT.

-FileSystemLabel <String[]>

Specifies the label to use for the volume.

-Force [<SwitchParameter>]

Specifies the override switch.

-Full [<SwitchParameter>]

Performs a full format. A full format writes to every sector of the disk, takes much longer to perform than the default (quick) format, and is not recommended on storage that is thinly provisioned.

-IsDAX [<SwitchParameter>]

Formats a volume as a DirectAccess (DAX) volume.

DAX provides applications with direct access and byte-addressability options via memory mapping on storage class memory (SCM) devices, such as NVDIMM-N.

If you do not specify the IsDAX parameter, the cmdlet defaults to a regular, non-DAX volume.

-NewFileSystemLabel [<String>]

Specifies a new label to use for the volume.

-ObjectId <String[]>

Specifies the ID of the volume to format.

-Partition [<CimInstance>]

Specifies the partition object on which to create the new volume. Enter a Partition CIM object, which is exposed by the Get-Partition and New-Partition cmdlets.

-Path <String[]>

Specifies the path of the volume to format.

-SetIntegrityStreams [<Boolean>]

Enables integrity streams on the volume to be formatted.

-ShortFileNameSupport [<Boolean>]

Specifies that support for short file names should be enabled on this volume.

-ThrottleLimit [<Int32>]

Specifies the maximum number of concurrent operations that can be established to run the cmdlet. If this parameter is omitted or a value of 0 is entered, then Windows PowerShellr calculates an optimum throttle limit for the cmdlet based on the number of CIM cmdlets that are running on the computer. The throttle limit applies only to the current cmdlet, not to the session or to the computer.

-UseLargeFRS [<SwitchParameter>]

Specifies that large File Record Segment (FRS) should be used.

-Confirm [<SwitchParameter>]

  • Default value is false

Prompts you for confirmation before running the cmdlet.Prompts you for confirmation before running the cmdlet.

-WhatIf [<SwitchParameter>]

  • Default value is false

Shows what would happen if the cmdlet runs. The cmdlet is not run.Shows what would happen if the cmdlet runs. The cmdlet is not run.

<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,ErrorAction, ErrorVariable, WarningAction, WarningVariable,OutBuffer, PipelineVariable, and OutVariable.

Inputs
Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_Volume
http://msdn.microsoft.com/library/windows/desktop/hh830604.aspx You can use the pipeline operator to pass an MSFT_Volume object to the InputObject parameter. Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_Partition http://msdn.microsoft.com/library/windows/desktop/hh830524.aspx You can use the pipeline operator to pass an MSFT_Partition object to the Partition parameter.
Outputs
Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_Volume
http://msdn.microsoft.com/library/windows/desktop/hh830604.aspx This cmdlet returns an object that represents the newly formatted volume.
Examples
  1. Quick format:
    PS C:\> Format-Volume -DriveLetter D
    

    This example performs a format of the D volume.

  2. Full format using FAT32:
    PS C:\> Format-Volume -DriveLetter C -FileSystem FAT32 -FullFormat -Force
    

    This example performs a full format of the D volume using the FAT32 file system.

Back to PowerShell Command list