PowerCLI one-liner to add PortGroup to a single ESX/ESXi host

A useful one-liner to add a PortGroup to an ESX/ESXi host:

get-vmhost -name esx1 | Get-VirtualSwitch -name vSwitch0 | new-VirtualPortGroup -name "Inside-VLAN" -vlanid 1001

It adds a PortGroup called Inside-VLAN to a VirtualSwitch called vSwitch0 which is tagged with vlan 1001.