vSphere: Get ESX Server Serial Numbers

KB ID 0001670


A few weeks ago I needed to sort out some extended warranty for a customers servers. To do that  I needed the serial numbers of those servers, (a mixture of IBM/Lenovo and Dell Servers).

As I didn’t fancy a drive to two different datacenters, I wanted to try and get them programatically.


After some searching I came across a post by one of my old EE buddies LucD with exactly what I needed. I’m assuming you have PowerCLI setup before beginning.

Connect to your Virtual infrastructure;

Connect-VIServer {vCenter-server-FQDN}

Then, (assuming you have a folder called C:\Temp that you can write to).

Get-VMHost | Select Name, @{N='Serial';E={(Get-EsxCli -VMHost $_).hardware.platform.get().SerialNumber}} | Export-Csv c:\temp\serial.csv -NoTypeInformation -UseCulture

PowerCLI Get ESX Serial Numbers

Then  open your C:\Temp\SerialNumber.csv file, and there’s your serial numbers.

Get All ESX Serial Numbers


Related Articles, References, Credits, or External Links


Author: PeteLong

Share This Post On

Submit a Comment

Your email address will not be published. Required fields are marked *