Quickly add a portgroup to all hosts in a cluster

Sometimes a new VLAN comes along that needs to be added to all hosts. This snippet is probably really obvious to anyone who’s done anything with VMware PowerCLI, but here it is anyway: Quickly add the same new portgroup/vlan to all hosts in a cluster:

get-cluster ProdCluster | get-vmhost | get-virtualswitch -name vSwitch1 | new-virtualportgroup -name Prod-Vlan0123 -vlanid 123