During my PowerCLI scripting for the provisioning of new ESX Hosts i have found another bug. The Set-VDSwitch CMDlet does not set the number of uplink ports correctly in every case.
You can change the number of uplink ports from 2 to 4 without problems, but the configuration back to two uplinks silently fails.
Set-VDSwitch -VDSwitch $dvSwitchObject -NumUplinkPorts “4″ -Confirm:$false
The dvSwitch has 4 uplink ports after the configuration change.
Set-VDSwitch -VDSwitch $dvSwitchObject -NumUplinkPorts “2″ -Confirm:$false
The dvSwitch still has 4 uplink ports after this configuration change. The CMDlet finishes without an error, but the configuration is unchanged. Currently i have no automation workaround for that, but i can change the settings in the vSphere Web Client manually.
I have opened a VMware SR. Let’s see if this bug is fixed in the next PowerCLI version.
The VMware versions in my development environment.
PowerCLI Version —————- VMware vSphere PowerCLI 5.5 Release 2 Patch 1 build 1931983 ————— Snapin Versions ————— VMWare AutoDeploy PowerCLI Component 5.5 build 1890764 VMWare ImageBuilder PowerCLI Component 5.5 build 1890764 VMware vCloud Director PowerCLI Component 5.5 build 1649227 VMware License PowerCLI Component 5.5 build 1265954 VMware VDS PowerCLI Component 5.5 build 1926677 VMware vSphere PowerCLI Component 5.5 Patch 1 build 1926677 VMware vSphere Update Manager PowerCLI 5.5 build 1302474 ————— vSphere Versions ————— vCenter 5.5 1891313 ESX 5.5 1331820