Guys,
I'm looking for a script to find all Dell hosts in my enviroment and if possible the current BIOS version. I would also like to output the results to an excel spreadsheet.
Thanks.
I made a script to find the BIO's info on Dell's. I had a mix of 6850's, R710's, R810's, and R900's.
Hi Peter,
you can get all the Dell hosts and their Bios version with:
Get-VMHost | ` Where-Object {$_.Manufacturer -eq "Dell"} | ` Select-Object -Property Name,Manufacturer,@{N="BiosVersion";E={$_.ExtensionData.Hardware.BiosInfo.BiosVersion}} | ` Sort-Object -Property Name | ` Export-Csv -NoTypeInformation -UseCulture -Path DellHosts.csv
Regards, Robert
Robert,
Thanks for your reply. While the script did execute without errors and it did create the csv file, the file itseldf was empty.
Hi Peter,
I have only HP servers. So I don't know exactly what the Manufacturer property of a Dell ESX server looks like. Maybe you can find out with
Get-VMHost | Select-Object -Property Name,Manufacturer
and change the script accordingly?
Regards, Robert
Robert has the right idea, I'd suggest changing the '-eq' to -'match' though. Dell tends to have a different entry depending on the generation of server for manufacturer.
Get-VMHost | ` Where-Object {$_.Manufacturer -match "Dell"} | ` Select-Object -Property Name,Manufacturer,@{N="BiosVersion";E={$_.ExtensionData.Hardware.BiosInfo.BiosVersion}} | ` Sort-Object -Property Name | ` Export-Csv -NoTypeInformation -UseCulture -Path DellHosts.csv
Hi peter79,
The file is empty because the Where-Object filter shhould be tweaked a little bit.
You should replace this:
{$_.Manufacturer -eq"Dell"}
with this:
{$_.Manufacturer -like "*Dell*"}
The -eq doesn't give you what you expect because it returns only the "dell" string whereas the -like and stars around the string return any string that contains the word "dell" ("Dell Inc." for example).
Regards,
-Angel
Angel,
Thanks for that tweak. The CSV file is now filling up however it still isnt picking up the BIOS version.
Well, it's the same in my environment too. By some reason the VI Api doesn't return the Bios information of the hosts.. Unfortunatly, I cannot think of another way to get it right now...
I made a script to find the BIO's info on Dell's. I had a mix of 6850's, R710's, R810's, and R900's.