Created
April 17, 2018 08:27
-
-
Save peterhynes/8198f714d3250bbff5c40c0aa53b0099 to your computer and use it in GitHub Desktop.
Get hardware and esxi details for clusters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Script to get bios version by Peter Hynes | |
| #Version 1.0 | |
| #Created on the 11/04/2018 | |
| #Connect to the vCenter or vcenters and Run within PowerCLI | |
| #You will need to create a txt file called clusters.txt and place it in the same folder as this script. Put the list of clusters you want to pull info from in to this txt file. | |
| $clusters = get-content .\clusters.txt | |
| try { | |
| get-cluster $clusters | | |
| Get-VMHost | | |
| Select-Object -Property Name, @{N="Cluster";E={$cluster}},Manufacturer, Model, Version, Build,@{Name='BIOS Version';Expression={(($_|Select-Object -ExpandProperty ExtensionData).Runtime.HealthSystemRuntime.SystemHealthInfo.NumericSensorInfo | ?{$_.Name -like "*bios*"}).Name.Split(' ')[4]}} | | |
| Export-Csv -Path .\ClusterHardwareAndEsxiVersion.csv -NoTypeInformation | |
| Write-Host "Script Complete. Check folder where script is located for CSV" -ForegroundColor Green | |
| } | |
| catch { | |
| Write-Host "$_.Exception.Message" -ForegroundColor Red | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment