Hyper-V Powershell

Get list of VLAN IDs from running VMs
get-vm | where state -eq running | Get-VMNetworkAdapterVlan

Get IOPs and Latency per VM
Invoke-Command -ComputerName hvserver1 -ScriptBlock {get-vm | where state -eq “running” | measure-vm | fl VMName, AggregatedAverageNormalizedIOPS, AggregatedAverageLatency}

Get the name of the vSwitch used by all the VMs on a host:

Get-VM -ComputerName | where state -eq running | select -ExpandProperty NetworkAdapters | select VMName, SwitchName, IPAddresses | ft -auto

Additionally, only list those that have an IP starting with 192.168.4*

Get-VM -ComputerName svr-hvhost6-27 | select -ExpandProperty NetworkAdapters | where IPaddresses -like “192.168.4*” | select VMName, SwitchName, IPAddresses | ft -auto

Disclaimer: provided “AS IS” with no warranties and confer no rights