Quantcast
Channel: VMware Communities : Discussion List - Automation Tools
Viewing all articles
Browse latest Browse all 9071

NIC/VMTool/Hardware Detail Along With OS Version

$
0
0

please help me with the script to put the required info.

Run the below command but couldn't't join the OS version with NIC Version.

 

$vms=Get-View -ViewType VirtualMachine

$(

foreach($vm in $vms){

$networkcards=$vm.guest.net | ?{$_.DeviceConfigId -ne -1}

""|select  @{n="VM name";e={$vm.name}},@{n="uuid";e={$vm.config.uuid}},

@{n="Net_info";e={[string]::join(',',  $($networkcards|%{$devid=$_.DeviceConfigId;[string]::join

(',',$(($vm.config.hardware.device|?{$_.key  -eq $devid}).gettype().name,$_.network,($_.ipaddress -join ';'),

$_.Macaddress))})  )}}

}  Get-View -Property @("Name", "Config.GuestFullName", "Guest.GuestFullName") |

Select -Property Name, @{N="Configured OS";E={$_.Config.GuestFullName}},  @{N="Running OS";

E={$_.Guest.GuestFullName}}

)


Viewing all articles
Browse latest Browse all 9071

Latest Images

Trending Articles



Latest Images

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