Get all ESXI details Powercli

VMwareHorizon VMwareHorizon

Hi All.
I would like to share with you a wonderful script that knows providing your any prices of details about your ESXi’s Hots, such as:
Name, ESX version, make, Model, Serial

$myESXiHosts = Get-VMHost | %{ $_ | Select Name,
@{N="ESXi Version";E={"$($_.Version) build $($_.Build)"}},
@{N="vCenter version";E={
$global:DefaultVIServers | 
where {$_.Name -eq ($_.ExtensionData.Client.ServiceUrl.Split('/')[2])} | 
%{"$($_.Version) build $($_.Build)"}
@{N="Make";E={(Get-EsxCli -VMHost $_.Name).hardware.platform.get().VendorName}},
@{N="Model";E={(Get-EsxCli -VMHost $_.Name).hardware.platform.get().ProductName}},
@{N="Serial";E={(Get-EsxCli -VMHost $_.Name).hardware.platform.get().SerialNumber}}


$myESXiHosts | Export-csv C:\Esxi.csv

Leave a Comment

Your email address will not be published.

Comment moderation is enabled. Your comment may take some time to appear.

In the news
Load More