«

»

Nov 13 2015

Print this Post

Using Set-VMNetworkAdapterVlan with clustered VMs

I recently needed to assign VLANs to a group of virtual machines on a Hyper-V cluster, tried to use the Set-VMNetworkAdapterVlan  cmdlet directly only to find that it needs the current host of each VM to work, so here’s a small script to get it done.

The script select only VMs where no VLAN is currently assigned – assuming that the VLAN ID is 1.

 

 

About the author

Walid AlMoselhy

Permanent link to this article: http://almoselhy.azurewebsites.net/2015/11/using-set-vmnetworkadaptervlan-with-clustered-vms/

Leave a Reply

Your email address will not be published. Required fields are marked *