Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 230613

Re: Unable to get Port Group Name and VLAN ID for VMs

$
0
0

Hi,

 

I am still seeing blank under VLAN ID for VM, please assist

 

Get-VM TESTVM | Get-HardDisk |

Select @{N='VM Name';E={$_.Parent.Name}},

@{N="IP Address";E={[string]::Join(',',$_.Parent.guest.IPAddress)}},  #All IPs of VMs

@{N="VLANId";E={Get-VirtualPortGroup -VM $_Parent.@{N="VLANId";E={$_.Extensiondata.Config.DefaultPortCOnfig.Vlan.VlanId}}}},

@{N='HD Name';E={$_.Name}},

@{N='HD Capacity';E={$_.CapacityGB}}

 

This is actually part of VLAN 100, when i run the script outut shows blank under VLANId


Viewing all articles
Browse latest Browse all 230613

Trending Articles