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}}
)