Hi guys,
First off... Here is the version of PowerCLI I am using:
PowerCLI Version
----------------
VMware vSphere PowerCLI 5.1 Release 2 build 1012425
---------------
Snapin Versions
---------------
VMWare AutoDeploy PowerCLI Component 5.1 build 768137
VMWare ImageBuilder PowerCLI Component 5.1 build 768137
VMware License PowerCLI Component 5.1 build 669840
VMware VDS PowerCLI Component 5.1 build 1012428
VMware vSphere PowerCLI Component 5.1 build 1012428
I am having an issue with Remove-VDSwitchVMHost that is a little frustrating. I have a script that I use to rebuild hosts in my environment when we upgrade versions. I recently changed to vDS switches. When the host is rebuilt, there is a phantom entry in the vDS for the old server. For some reason, I cannot get it removed with Remove-VDSwitchVMHost.
Image may be NSFW.
Clik here to view.
Both hosts in this cluster show up in the GUI. Esxt21 is the server I just rebuilt and added back to vCenter.
When you go through PowerCLI, it presents different information:
Image may be NSFW.
Clik here to view.
When I enter: get-vmhost $vmhost | Get-VDSwitch Nothing is returned. If I enumerate the switch first, then get-vmhost, it shows data:
Image may be NSFW.
Clik here to view.
Get-VDSwitch $vDSName | get-vmhost $vmhost | Remove-VDSwitchVMHost doesnt seem to work either.
I can delete the host through the GUI but that defeats the idea of a script Image may be NSFW.
Clik here to view.
Has anyone had any luck with this?
Thanks,
Dan