The output produced is of type EsxCliObjectImpl, but you can use most regular cmdlets to handle the result.
For example
$esxcli.network.nic.list() |
Export-Csv -Path report.csv -NoTypeInformation -UseCulture
Is there anything specific you want to do with the output?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Hi LucD,
In fact i'ld like to identify different model of NIC (ie : if one card dual port & one card quad port, I'ld like to see 2 values), used driver with is version, vid and did...
I'm not sure you will find that information with that command.
Can you perhaps show what you want to extract from the output?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Sure, I'll not be able to find all information with this command but it'll be the best source to identify NIC name or model, and use it as argument with another commands
the goal is to put all these information, with others, in a excelsheet...
You mean like this?
$esxcli.network.nic.list() | Select Name,Description
Which you can export to a CSV
$esxcli.network.nic.list() |
Select Name,Description |
Export-Csv -Path report.csv -NoTypeInformation -UseCulture
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Yes, but the csv must contains also lot of others information...
If I use Export-Csv, I'll not be able to manipulate others data easily.
In fact, I made mistake using [] with .list()
And finally, this basic solution is sufficient for my needs !
$vmniclist = get-esxcli -VMhost $host
$vmniclist = $vmniclist.network.nic.list()
$vmnic0Name = $vmniclist[0].Name
$vmnic0Desc = $vmniclist[0].Decription
[...]
Thanks a lot LucD