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

Badges
MCSE
Community

Cozumpark Bilisim Portali
Change Vlan ID of Virtual Machines with Powershell
Posted in Virtual Machine Manager, Windows Powershell | No Comment | 6,781 views | 20/06/2009 08:21

You can change vlan id of virtual machines with Powershell:

1
2
3
4
5
Add-PSSnapin -name Microsoft.SystemCenter.VirtualMachineManager
Get-Vmmserver localhost
$VMNO = $args[0]
$VLANID = $args [1]
get-vm $VMNO | Get-VirtualNetworkAdapter | Set-VirtualNetworkAdapter -VLANEnabled $true -VLANID $VLANID

If you need to disable Vlan, just use $false for -VLANEnabled.



Leave a Reply