Cmdlets

Choose a cmdlet from the list on the left or search for a specific cmdlet. Choose a cmdlet from the list or search for a specific cmdlet.
About Help  Providers
 

Format-Volume

Format-Volume

volume.cdxml

Synopsis

Formats one or more existing volumes or a new volume on an existing partition.

Syntax

Format-Volume [-DriveLetter] [-AllocationUnitSize] [-AsJob] [-CimSession] [-Compress] [-DisableHeatGathering] [-FileSystem] [-Force] [-Full] [-NewFileSystemLabel] [-SetIntegrityStreams] [-ShortFileNameSupport] [-ThrottleLimit] [-UseLargeFRS] [-Confirm] [-WhatIf] [<CommonParameters>]

Format-Volume [-AllocationUnitSize] [-AsJob] [-CimSession] [-Compress] [-DisableHeatGathering] [-FileSystem] [-Force] [-Full] [-NewFileSystemLabel] [-Partition] [-SetIntegrityStreams] [-ShortFileNameSupport] [-ThrottleLimit] [-UseLargeFRS] [-Confirm] [-WhatIf] [<CommonParameters>]

Format-Volume [-AllocationUnitSize] [-AsJob] [-CimSession] [-Compress] [-DisableHeatGathering] [-FileSystem] [-Force] [-Full] [-NewFileSystemLabel] [-SetIntegrityStreams] [-ShortFileNameSupport] [-ThrottleLimit] [-UseLargeFRS] [-FileSystemLabel] [-Confirm] [-WhatIf] [<CommonParameters>]

Format-Volume [-AllocationUnitSize] [-AsJob] [-CimSession] [-Compress] [-DisableHeatGathering] [-FileSystem] [-Force] [-Full] [-NewFileSystemLabel] [-SetIntegrityStreams] [-ShortFileNameSupport] [-ThrottleLimit] [-UseLargeFRS] [-InputObject] [-Confirm] [-WhatIf] [<CommonParameters>]

Format-Volume [-AllocationUnitSize] [-AsJob] [-CimSession] [-Compress] [-DisableHeatGathering] [-FileSystem] [-Force] [-Full] [-NewFileSystemLabel] [-SetIntegrityStreams] [-ShortFileNameSupport] [-ThrottleLimit] [-UseLargeFRS] [-Path] [-Confirm] [-WhatIf] [<CommonParameters>]

Format-Volume [-AllocationUnitSize] [-AsJob] [-CimSession] [-Compress] [-DisableHeatGathering] [-FileSystem] [-Force] [-Full] [-NewFileSystemLabel] [-SetIntegrityStreams] [-ShortFileNameSupport] [-ThrottleLimit] [-UseLargeFRS] [-ObjectId] [-Confirm] [-WhatIf] [<CommonParameters>]

Detailed Description

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.

Aliases

ClusterSize

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-AsJob <SwitchParameter>

Runs the cmdlet as a background job. Use this parameter to run commands that take a long time to complete. The cmdlet immediately returns an object that represents the job and then displays the command prompt. You can continue to work in the session while the job completes. To manage the job, use the *-Job cmdlets. To get the job results, use the Receive-Job cmdlet. For more information about Windows PowerShell® background jobs, see about_Jobs.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-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.

Aliases

Session

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-Compress <SwitchParameter>

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

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-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.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-DriveLetter <Char[]>

Specifies the drive letter of the volume to format.

Aliases

None

Required?

true

Position

1

Default value

None

Accept pipeline input?

True (ByPropertyName)

Accept wildcard characters?

false

-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.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-FileSystemLabel <String[]>

Specifies the label to use for the volume.

Aliases

None

Required?

true

Position

named

Default value

None

Accept pipeline input?

True (ByPropertyName)

Accept wildcard characters?

false

-Force <SwitchParameter>

Specifies the override switch.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-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.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-InputObject <CimInstance[]>

Specifies one or more existing Volume objects to format. Enter one or more Volume CIM objects, which is output by the Get-Volume cmdlet.

Aliases

None

Required?

true

Position

named

Default value

None

Accept pipeline input?

True (ByValue)

Accept wildcard characters?

false

-NewFileSystemLabel <String>

Specifies a new label to use for the volume.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-ObjectId <String[]>

Specifies the ID of the volume to format.

Aliases

Id

Required?

true

Position

named

Default value

None

Accept pipeline input?

True (ByPropertyName)

Accept wildcard characters?

false

-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.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

True (ByValue)

Accept wildcard characters?

false

-Path <String[]>

Specifies the path of the volume to format.

Aliases

None

Required?

true

Position

named

Default value

None

Accept pipeline input?

True (ByPropertyName)

Accept wildcard characters?

false

-SetIntegrityStreams <Boolean>

Enables integrity streams on the volume to be formatted.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-ShortFileNameSupport <Boolean>

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

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-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 PowerShell® 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.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-UseLargeFRS <SwitchParameter>

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

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-Confirm <SwitchParameter>

Prompts you for confirmation before running the cmdlet.

Aliases

None

Required?

false

Position

named

Default value

false

Accept pipeline input?

false

Accept wildcard characters?

false

-WhatIf <SwitchParameter>

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

Aliases

None

Required?

false

Position

named

Default value

false

Accept pipeline input?

false

Accept wildcard characters?

false

Input Type

Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_Volume
Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_Partition

Return Type

Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_Volume

Notes

None

Examples

Example 1: Quick format

This example performs a format of the D volume.

PS C:\>Format-Volume -DriveLetter D

Example 2: Full format using FAT32

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

PS C:\>Format-Volume -DriveLetter C -FileSystem FAT32 -FullFormat –Force

Online Version
Get-Disk
Initialize-Disk
New-Partition
Get-Partition
Get-Volume
Optimize-Volume
Repair-Volume
Set-Volume