Quantcast
Channel: VMware Communities : Blog List - All Communities
Viewing all articles
Browse latest Browse all 3135

Outputs VM's Guest OS, host, compatibility version, IP address, VMware tools version and its Powerstate in CSV format.

$
0
0

Sharing you my script that exports VM's Guest OS, host, compatibility version, IP address, VMware tools version and its status into a CSV format.

 

# $vmNames = Get-Content -Path D:\vmnames.txt
# Get-VM -Namen $vmNames | VMList
# Get-VM -Location "pit-esx16.sj” |  #Host-level

Get-VM -Location "PIT_Standalone_Production” | #Cluster-level

Get-View | Select  Name, PowerState,
@{Name="Host"; Expression={$_.VMHost.Name}},
@{Name="Running OS"; Expression={$_.Guest.GuestFullName}},
@{Name=”Tools Version Status”; Expression={$_.Guest.ToolsVersionStatus}},
@{Name=”Hardware Version”; Expression={$_.Config.Version}},
@{Name=”Tools Status”; Expression={$_.Guest.ToolsStatus}},
@{Name="IP Address"; Expression={$_.Guest.IPAddress}} | Sort-Object Name | Export-CSV D:\PIT\cluster-output.csv –NoType

Viewing all articles
Browse latest Browse all 3135

Trending Articles



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