if (!$global:DefaultVIServers){Write-Host -ForegroundColor Red "Not connected to vcenter !";break} #check vcenter connection ForEach ($Cluster in (Get-View -ViewType ClusterComputeResource )) { $BiosList = $Cluster.Host|%{Get-View $_}|?{$_.Runtime.ConnectionState -eq "connected"}|sort name|select @{n="cluster";e={$Cluster.name}}, name,@{n="BiosVersion";e={[Regex]::Match(($_.Runtime.HealthSystemRuntime.SystemHealthInfo.NumericSensorInfo|?{$_.name -match "bios" -and $_.SensorType -match "Software Components"}).name,"BIOS (.*) (20[0-9]{2,2}-[0-9]{2,2}-[0-9]{2,2})").groups[1].value}},@{n="ReleaseDate";e={[Regex]::Match(($_.Runtime.HealthSystemRuntime.SystemHealthInfo.NumericSensorInfo|?{$_.name -match "bios" -and $_.SensorType -match "Software Components"}).name,"BIOS (.*) (20[0-9]{2,2}-[0-9]{2,2}-[0-9]{2,2})").groups[2].value}} if (($BiosList|select BiosVersion -Unique|measure-object).count -gt 1){$BiosList|Format-Table -HideTableHeaders} }