< Back

Format-Volume

Wed Jan 30, 2019 6:01 pm

NAME Format-Volume



SYNOPSIS

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





SYNTAX

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





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.



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.



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.



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.



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.



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.



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.



Required? true

Position? named

Default value none

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Force [<SwitchParameter>]

Specifies the override switch.



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.



Required? false

Position? named

Default value none

Accept pipeline input? false

Accept wildcard characters? false



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



Required? false

Position? named

Default value none

Accept pipeline input? false

Accept wildcard characters? false



-NewFileSystemLabel [<String>]

Specifies a new label to use for the volume.



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.



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.



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.



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.



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.



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.



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.



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.Prompts you for confirmation before running the cmdlet.



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.Shows what would happen if the cmdlet runs. The cmdlet is not run.



Required? false

Position? named

Default value false

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

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

http://msdn.microsoft.com/library/windo ... 30604.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/windo ... 30524.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/windo ... 30604.aspx





This cmdlet returns an object that represents the newly formatted volume.





Example 1: Quick format



PS C:\\>Format-Volume -DriveLetter D



This example performs a format of the D volume.





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







RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/?LinkId=812153

Get-DiskStorageNodeView

Initialize-Disk

New-Partition

Get-Partition

Get-Volume

Optimize-Volume

Repair-Volume

Set-Volume