Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 219257

Re: Script to collect Inventory report

$
0
0

You can use the following PowerCLI script to retrieve the required information about your hosts. The method to retrieve the hardware serial number is not full proof and is depending on the hardware you are using.

 

Get-VMHost |

Select-Object -Property @{Name='ESX HostName';Expression={$_.Name}},

@{Name='Datacenter';Expression={(Get-Datacenter -VMHost $_).Name}},

@{Name='Cluster Name';Expression={$_.Parent.Name}},

@{Name='vCenter Name';Expression={$_.Uid.Split('@')[1].Split(':')[0]}},

Version,Build,

@{Name='ESXi MGMT IP';Expression={$_ | Get-VMHostNetworkAdapter | Where-Object {$_.ManagementTrafficEnabled} | Select-Object -ExpandProperty IP}},

@{Name='vMotion IP';Expression={$_ | Get-VMHostNetworkAdapter | Where-Object {$_.vMotionEnabled} | Select-Object -ExpandProperty IP}},

Model,NumCPU,MemoryTotalGB,

@{Name='Hardware Serial Number';Expression={$_.ExtensionData.Hardware.SystemInfo.OtherIdentifyingInfo.IdentifierValue[4]}}


Viewing all articles
Browse latest Browse all 219257

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>