This article explains how to work with vSAN resources using PowerCLI.
Note I am using the following versions:
PowerShell: 5.1.14393.3866
VMware PowerCLI: 12.1.0.17009493
Connect to vCenter:
Connect-VIServer <IP of vCenter server>
List all vSAN get cmdlets:
Get-Command Get-Vsan*
vSAN runtime info:
$c = Get-Cluster Cluster01
Get-VsanRuntimeInfo -Cluster $c
vSAN space usage:
Get-VsanSpaceUsage
vSAN cluster configuration:
Get-VsanClusterConfiguration
Get-VsanDisk
(Get-VsanDisk)[31] | select *
(Get-VsanDisk)[31].ExtensionData
Get-VsanDiskGroup
Use "extensiondata" property to get more details about cache and capacity tiers:
Cache tier details:
(Get-VsanDiskGroup)[0].ExtensionData.Ssd
Capacity tier details:
(Get-VsanDiskGroup)[0].ExtensionData.NonSsd
Hope it was useful. Cheers!
No comments:
Post a Comment