VMware Cloud Community
saidar
Contributor
Contributor

Can't remove VDS using PowerCli

Hi ,

at start iforced probel to get VDS in my setup . iinstall powercli 5.0.1and work fine

but when i try to remove VDS iget this error :

PS C:\> Remove-Vds newvds
Remove-Vds : Cannot process argument transformation on parameter 'DistributedSwitch'. Unexpected error occured. The string wrapper for
type VMware.VimAutomation.VdsComponent.Types.V1.VdsVSphereDistributedSwitch is not defined
At line:1 char:11
+ Remove-Vds <<<<  newvds
    + CategoryInfo          : InvalidData: (:) [Remove-Vds], ParameterBindin...mationException
    + FullyQualifiedErrorId : ParameterArgumentTransformationError,VMware.VimAutomation.VdsComponent.Commands.Cmdlets.RemoveDistribute
   dSwitch

Any idea about this error ?

Thanks

said

0 Kudos
7 Replies
LucD
Leadership
Leadership

I suspect you are using the VDSPowerCLI fling ?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
LucD
Leadership
Leadership

If yes, you should probably do

Get-Vds -Name newvds | Remove-Vds


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

saidar
Contributor
Contributor

The same result

0 Kudos
saidar
Contributor
Contributor

I try reinstall powercli 5.0.1 and add Add-PSSnapin VMware.VimAutomation.VdsComponent into powercli

resolve the problem ,working fine now Smiley Happy

thanks

0 Kudos
LucD
Leadership
Leadership

There have been messages in the comments about the VDSPowerCLI having problems with the most recent PowerCLI versions.

Quote from the comments: "FYI, removed powercli 5.1 and reinstalled 5.0 version and now it works as expected".

Which PowerCLI version are you using ?

Get-PowerCLIVersion


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
LucD
Leadership
Leadership

Our posts have crossed each other it seems Smiley Happy


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
saidar
Contributor
Contributor

i use thisversion

PowerCLI C:\> Get-PowerCLIVersion
PowerCLI Version
----------------
   VMware vSphere PowerCLI 5.0.1 build 581491
---------------
Snapin Versions
---------------
   VMware AutoDeploy PowerCLI Component 5.0 build 5449
   VMware ImageBuilder PowerCLI Component 5.0 build 54
   VMware vCloud Director PowerCLI Component 1.5 build
   VMware License PowerCLI Component 5.0 build 544881
   VMware VDS vSphere PowerCLI Component 4.1.1 build 0
   VMware vSphere PowerCLI Component 5.0 build 581435
0 Kudos