All
I am looking for something to collect this info per vCenter but if this is not possible, per cluster or datacenter works too.
I tried this and thought I had it until... I opened the output and tried to correlate back to a VM. The VM was not included.
Get-VM | Get-VirtualPortGroup |export-csv -notypeinformation c:\temp$filename
thanks!
Jason C.
*I give credit for helpful responses!!!
Hi
Try this
Get-VirtualPortGroup - VM * |export-csv -notypeinformation c:\temp$filename
Venkat
Try like this
$tgtPg = 'VxLAN'
Get-VM |
where{Get-VirtualPortGroup -VM $_ -Name $tgtPg -ErrorAction SilentlyContinue} |
Select Name,@{N='Portgroup';E={$tgtPG}} |
Export-Csv report.csv -NoTypeInformation -UseCulture
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
This worked to find the specific word we use for "virtualwires" in the name of the portgroup.
Thanks.