thank you very much lucd for your prompt reply .
I have found some information in this community like how to export the VMname, the guestOS, in the CSV file. that's clear for me.
Get-Cluster -Name cluster1 | Get-VM | Get-NetworkAdapter | `
Select-Object -Property `
@{N="VM Name";E={$_.Parent}},
@{N="NIC Name";E={$_.Name}},
@{N="Network Name";E={$_.NetworkName}} |
Export-Csv -Path c:\NetworkAdapters.csv -NoTypeInformation -UseCulture
but I didn't see how to integrate the result of invoke-script in the same CSV file
Invoke-VMScript -VM VMName -scripttext "Get-NetIPConfiguration" -GuestUser user -GuestPassword password
I need to concatenate the two output in the same file so the the result should be in this format
VMname VNICname NetworkName IPAddress DNS Gateway netMask