jpsider
Expert
Expert

Are you talking something like this:

Once connected to your vCenter

$allHosts = get-vmHost

foreach ($vmhost in $allHosts( {

  write-host "Running ESXCLIv2 on host $vmhost"

  $esxcli = Get-Esxcli -VMHost $vmhost -V2

  $serialNum = $esxcli.hardware.platform.get.Invoke().SerialNumber

  #Do something with the serial Number here?

  write-host $serialNum

}

or am I missing something?