VsanStorage Category | Vmware PowerCLI Reference

vSAN Storage Category

Cmdlets are usually implemented around resource operations. The four basic operations are CREATE, READ, UPDATE and DELETE. This set of operations is known as CRUD. Most of the cmdlets support CRUD which are respectively cmdlets that start with the New/Get/Set/Remove cmdlet verbs but they also may have additional operations

Step 1: Retrieve a object by running a Get command

You can READ objects by using Get-VsanStoragePoolDisk cmdlet. See example below:

# Retrieves all vSAN storage pool disks from the specified cluster.

Get-VsanstoragepoolDisk -Cluster $config.cluster

Step 2 : Run commands from the CRUD group

You can UPDATE objects by using Add-VsanStoragePoolDisk cmdlet. See example below:

# Adds disks with specified canonical names from a specified host as "singleTier" vSAN storage pool disks.

Add-VsanStoragePoolDisk -VMHost (Get-VMHost 10.192.201.50) -VsanStoragePoolDiskType "singleTier" -DiskCanonicalName ("mpx.vmhba0:C0:T11:L0","mpx.vmhba0:C0:T12:L0")
You can REMOVE objects by using Remove-VsanStoragePoolDisk cmdlet. See example below:

# Removes vSAN storage pool disks from the specified host without confirmation.

$disks =get-vsanstoragepooldisk -VMHost (Get-VMHost 10.192.201.50) Remove-VsanStoragePoolDisk -VsanStoragePoolDisk $disks -VsanDataMigrationMode nodatamigration -Purpose "test" -Confirm:$false

Step 3: Explore More Related Commands:


Test-VsanStoragePerformance This cmdlet runs a storage performance test on the specified vSAN clusters and returns the test results.