search
Categories
Sponsors
VirtualMetric Hyper-V Monitoring, Hyper-V Reporting
Archive
Blogroll

Badges
MCSE
Community

Cozumpark Bilisim Portali
Finding VMs with specific VLAN id in a Hyper-V Cluster via PowerShell
Posted in Windows Powershell, Windows Server | No Comment | 4,621 views | 19/07/2014 22:43

You can search VMs with specific VLAN id with following script:

1
2
3
4
5
$ClusterNodes = Get-Cluster | Get-ClusterNode
foreach ($ClusterNode in $ClusterNodes)
{
	Get-VM -ComputerName $ClusterNode | Where {$_.NetworkAdapters.VlanSetting.AccessVlanId -eq "173"}
}

That will give you VM list which has VLAN 173.



Leave a Reply