Storage‎ > ‎

List Datastores and naa. Identifiers for a Cluster

posted Jul 11, 2013, 2:08 PM by Kris Knight   [ updated Apr 3, 2015, 10:38 PM ]
$ClusterName = "Cluster Name"

Get-Cluster $ClusterName | Get-VMHost | Get-Datastore | Where {$_.Name -notmatch "-Local" -and $_.Name -notmatch "NFS"} | Select Name,@{N="DiskName";E={$_.ExtensionData.Info.Vmfs.Extent.DiskName}}

#Note, I'm using -notmatch to exclude datastores. <--- reasons to have a good naming convention.
Comments