Quantcast
Channel: VMware Communities : All Content - All Communities
Viewing all articles
Browse latest Browse all 179681

VM hardware report

$
0
0


I have a script that generates a report of the VM tools and hardware using Get-View. I want to add the cluster to the report, if it exists.  Best way to do this?

 

 

$result= @() 
Get-View-ViewTypeVirtualMachine-Property"Name", "Guest.guestfullname",`
    "Config.version", "Guest.hostname", "Guest.toolsversion", "guest.toolsversionstatus" |
% {       
$row="" | select Name, OS, HWVersion, Host, ToolsVersion, ToolsVersionStatus
$row.Name =$_.Name       
$row.OS =$_.guest.guestfullname       
$row.HWVersion =$_.config.version       
$row.Host =$_.guest.hostname       
$row.ToolsVersion =$_.guest.toolsversion       
$row.ToolsVersionstatus =$_.guest.toolsversionstatus       
$result+=$row
    }
$result

Viewing all articles
Browse latest Browse all 179681

Trending Articles



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