VMware Cloud Community
Sudarshan_Bhart
Enthusiast
Enthusiast
Jump to solution

PowerCLI: Network Adapter Information

Hello All

I am running a script to extract VM Information including vCPU, Memory, OS, Disks, Partition Size, RDM, IP Address, vCenter, VMX, VMDK etc. For PortGroup name, I am using below method

$vm = Get-VM myvm1.domain.com

$vm | Get-NetworkAdapter | Select -ExpandProperty NetworkName

which is increasing my script output time for an vCenter Server managing 2000+ VMs. I could extract everything else with Get-VM and would like to find out if there any option/way to find out PortGroup name with Get-VM too.

Please suggest.

1 Solution

Accepted Solutions
Zsoldier
Expert
Expert
Jump to solution

(get-view $vm.extensiondata.network).name

would probably produce the quickest results.

Chris Nakagaki (中垣浩一)
Blog: https://tech.zsoldier.com
Twitter: @zsoldier

View solution in original post

2 Replies
Zsoldier
Expert
Expert
Jump to solution

(get-view $vm.extensiondata.network).name

would probably produce the quickest results.

Chris Nakagaki (中垣浩一)
Blog: https://tech.zsoldier.com
Twitter: @zsoldier
Sudarshan_Bhart
Enthusiast
Enthusiast
Jump to solution

Thanks. Let me try today and update.

Reply
0 Kudos