PowerCLI Reference

Format-VMHostDiskPartition

Synopsis

This cmdlet formats a new VMFS (Virtual Machine File System) on each of the specified host disk partitions.

Syntax

Format-VMHostDiskPartition [-VolumeName] <String> -VMHostDiskPartition <VMHostDiskPartition[]> [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-VMHostDiskPartition

Detailed Description

This cmdlet formats a new VMFS (Virtual Machine File System) on each of the specified host disk partitions.

Parameters

NameTypeDescriptionRequired?Pipeline InputDefault Value
VolumeNameStringSpecifies a name for the new VMFS.truefalse
ConfirmSwitchParameterIf the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation.falsefalse
VMHostDiskPartitionVMHostDiskPartition[]Specifies the disk partitions on which you want to format a new VMFS.truetrue (ByValue)
WhatIfSwitchParameterIndicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified.falsefalse

Return Type

Zero or more formatted VMHostDiskPartition objects

Notes

Examples

-------------- Example 1 --------------

Get-VMHost Host | Get-VMHostDisk | Get-VMHostDiskPartition | ? {.Type -eq "Ntfs"} | Format-VMHostDiskPartition -VolumeName "NewStorage"

Formats the NTFS disk partitions of a host.


Copyright © VMware, Inc. All rights reserved.