Format-Volume

Format-Volume

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

構文

Parameter Set: ByDriveLetter
Format-Volume [-DriveLetter] <Char[]> [-AllocationUnitSize <UInt32> ] [-AsJob] [-CimSession <CimSession[]> ] [-Compress] [-DisableHeatGathering] [-FileSystem <String> ] [-Force] [-Full] [-NewFileSystemLabel <String> ] [-SetIntegrityStreams <Boolean> ] [-ShortFileNameSupport <Boolean> ] [-ThrottleLimit <Int32> ] [-UseLargeFRS] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: ById
Format-Volume -ObjectId <String[]> [-AllocationUnitSize <UInt32> ] [-AsJob] [-CimSession <CimSession[]> ] [-Compress] [-DisableHeatGathering] [-FileSystem <String> ] [-Force] [-Full] [-NewFileSystemLabel <String> ] [-SetIntegrityStreams <Boolean> ] [-ShortFileNameSupport <Boolean> ] [-ThrottleLimit <Int32> ] [-UseLargeFRS] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: ByLabel
Format-Volume -FileSystemLabel <String[]> [-AllocationUnitSize <UInt32> ] [-AsJob] [-CimSession <CimSession[]> ] [-Compress] [-DisableHeatGathering] [-FileSystem <String> ] [-Force] [-Full] [-NewFileSystemLabel <String> ] [-SetIntegrityStreams <Boolean> ] [-ShortFileNameSupport <Boolean> ] [-ThrottleLimit <Int32> ] [-UseLargeFRS] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: ByPartition
Format-Volume [-AllocationUnitSize <UInt32> ] [-AsJob] [-CimSession <CimSession[]> ] [-Compress] [-DisableHeatGathering] [-FileSystem <String> ] [-Force] [-Full] [-NewFileSystemLabel <String> ] [-Partition <CimInstance> ] [-SetIntegrityStreams <Boolean> ] [-ShortFileNameSupport <Boolean> ] [-ThrottleLimit <Int32> ] [-UseLargeFRS] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: ByPaths
Format-Volume -Path <String[]> [-AllocationUnitSize <UInt32> ] [-AsJob] [-CimSession <CimSession[]> ] [-Compress] [-DisableHeatGathering] [-FileSystem <String> ] [-Force] [-Full] [-NewFileSystemLabel <String> ] [-SetIntegrityStreams <Boolean> ] [-ShortFileNameSupport <Boolean> ] [-ThrottleLimit <Int32> ] [-UseLargeFRS] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: InputObject (cdxml)
Format-Volume -InputObject <CimInstance[]> [-AllocationUnitSize <UInt32> ] [-AsJob] [-CimSession <CimSession[]> ] [-Compress] [-DisableHeatGathering] [-FileSystem <String> ] [-Force] [-Full] [-NewFileSystemLabel <String> ] [-SetIntegrityStreams <Boolean> ] [-ShortFileNameSupport <Boolean> ] [-ThrottleLimit <Int32> ] [-UseLargeFRS] [-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.

パラメーター

-AllocationUnitSize<UInt32>

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

エイリアス

ClusterSize

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-AsJob

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-CimSession<CimSession[]>

リモート セッションまたはリモート コンピューターでコマンドレットを実行します。New-CimSession コマンドレットや Get-CimSession コマンドレットの出力など、コンピューター名またはセッション オブジェクトを入力します。既定値は、ローカル コンピューターで実行中の現在のセッションです。

エイリアス

Session

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-Compress

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

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-DisableHeatGathering

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.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-DriveLetter<Char[]>

Specifies the drive letter of the volume to format.

エイリアス

なし

必須?

true

位置は?

1

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-FileSystem<String>

Specifies the file system with which to format the volume. このパラメーターに対して使用できる値: NTFS, ReFS, exFAT, FAT32, and FAT.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-FileSystemLabel<String[]>

Specifies the label to use for the volume.

エイリアス

なし

必須?

true

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-Force

Specifies the override switch.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-Full

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.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

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.

エイリアス

なし

必須?

true

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByValue)

ワイルドカード文字を許可する

false

-NewFileSystemLabel<String>

Specifies a new label to use for the volume.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-ObjectId<String[]>

Specifies the ID of the volume to format.

エイリアス

Id

必須?

true

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

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.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByValue)

ワイルドカード文字を許可する

false

-Path<String[]>

Specifies the path of the volume to format.

エイリアス

なし

必須?

true

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-SetIntegrityStreams<Boolean>

Enables integrity streams on the volume to be formatted.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-ShortFileNameSupport<Boolean>

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

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-ThrottleLimit<Int32>

このコマンドレットを実行するために確立できる最大同時操作数を指定します。このパラメーターを省略するか、値として 0 を入力した場合、Windows PowerShell® では、コンピューターで実行している CIM コマンドレットの数に基づいて、コマンドレットに対する最適なスロットル制限を計算します。スロットル制限は現在のコマンドレットのみに適用され、セッションまたはコンピューターには適用されません。

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-UseLargeFRS

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

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-Confirm

コマンドレットを実行する前に、ユーザーに確認を求めます。

必須?

false

位置は?

named

既定値

false

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-WhatIf

コマンドレットを実行するとどのような結果になるかを表示します。コマンドレットは実行されません。

必須?

false

位置は?

named

既定値

false

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

<CommonParameters>

このコマンドレットは次の共通パラメーターをサポートします。-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、-OutVariable.詳細については、以下を参照してください。 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216)。

入力

入力型は、コマンドレットにパイプできるオブジェクトの型です。

出力

出力型は、コマンドレットによって生成されるオブジェクトの型です。

  • Microsoft.Management.Infrastructure.CimInstance オブジェクトは、Windows Management Instrumentation (WMI) オブジェクトを表示するラッパー クラスです。シャープ記号 (#) の後のパスは、基になる WMI オブジェクトの名前空間とクラス名です。

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

関連トピック

Get-Disk

Initialize-Disk

New-Partition

Get-Partition

Get-Volume

Optimize-Volume

Repair-Volume

Set-Volume