Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
27 lines (25 sloc) 982 Bytes
Function Get-VSANVersion {
<#
.NOTES
===========================================================================
Created by: William Lam
Organization: VMware
Blog: www.virtuallyghetto.com
Twitter: @lamw
===========================================================================
.DESCRIPTION
This function retreives the vSAN software version for both VC/ESXi
.PARAMETER Cluster
The name of a vSAN Cluster
.EXAMPLE
Get-VSANVersion -Cluster VSAN-Cluster
#>
param(
[Parameter(Mandatory=$true)][String]$Cluster
)
$vchs = Get-VSANView -Id "VsanVcClusterHealthSystem-vsan-cluster-health-system"
$cluster_view = (Get-Cluster -Name $Cluster).ExtensionData.MoRef
$results = $vchs.VsanVcClusterQueryVerifyHealthSystemVersions($cluster_view)
Write-Host "`nVC Version:"$results.VcVersion
$results.HostResults | Select Hostname, Version
}