Im trying to extract virtual network information for a VM using powershell, i tried using regular expression but for VM\'s with more than 1 NIC im unable to see output
B
Try this:
Get-VM sql.IAN01.Host | Select-Object @{Name="VMName";Expression={$_.name}},@{Name='VirtualNetwork';e={$_.VirtualNetworkAdapters | Foreach-Object{$_.VirtualNetwork}}}