You can try:
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={($_.Parent | Get-VirtualPortGroup).VlanId}},
@{N='HD Name';E={$_.Name}},
@{N='HD Capacity';E={$_.CapacityGB}}
The above code will only work with a standard vSwitch.
However it seems that you are not aiming in the right direction.
A VM can have 0 to many disks.
A VM van have 0 to many network adapter. (0 will not be very useful though)
So it will be more logical to:
Create a script that will extract all disks information with one line per disk.
Create another script that will extract all network adapters information with one line per network adapter.
In the second script it will be necessary to identify if each network adapter is associated to a standard port group or to a distributed port group.