Adding a Virtual PortGroup to all Hosts

Connect-VIServer -Server <vCenter Server>
Get-VMHost | Get-VirtualSwitch -Name <vSwitch Number> | New-VirtualPortGroup -Name <Virtual PortGroup
 Name> -VLanId <VLan ID>
Disconnect-VIServer -Confirm:$false

Related posts:

  1. Adding Virtual PortGroups to all ESX Hosts in a Cluster
  2. PowerCLI: Reconfiguring NTP Servers on ESX Hosts
  3. PowerCLI: A Simple VM Backup Script
  4. Do I Upgrade to VMware Virtual Hardware Version 7?
Get Adobe Flash playerPlugin by wpburn.com wordpress themes