July 14, 2017

Adding a PortGroup/VLAN to standard switch using Powercli

Not like in a Distributed Switch , when we are doing some change to a  Standers switch we will be needing to do the same configuration over and over for every Host,

As a Example  if adding a VLAN is took a 3 Min , assume we have 10 Hosts total time will be 30Min..

But using a powercli it will only take a one Min

below is the one liner for this

Get-Cluster “U1 Cluster” | Get-VMHost | Get-VirtualSwitch -Name “vSwitch1” | New-VirtualPortGroup -Name “XCL VLAN 405” -VLanId 405