I am trying to write a script that will add newly built vSphere 5 hosts to our vDS switch, I am having a hard time and sadly it seems like it should pretty straight forward.
# Adds the host and vmnics into the vDS # Get-Vds $vds Add-VdsVMHost -Vds $vds -VMHosts $b -Confirm:$false Move-VdsVMHostNetworkAdapter -VirtualNic vmnic0,vmnic2 -vds $vds -DVPortgroup $Management,$vmotion -Confirm:$false Move-VdsVMHostNetworkAdapter -VirtualNic vmnic1,vmnic3 -vds $vds -DVPortgroup $v216,$v218,$v291 -Confirm:$false When I do this early on I get an error Add-VdsVMHost : Cannot process argument transformation on parameter 'Vds'. Unexpected error occured. The string wrapper for type VMware.VimAutomation.VdsCom ponent.Types.V1.VdsVSphereDistributedSwitch is not defined At C:\Users\pweap47\AppData\Local\Temp\2a543dfa-155c-48e2-bf72-84b7b72d4e00.ps1:33 char:34 + Get-Vds $vds | Add-VdsVMHost -vds <<<< $vds -vmhost $b -Confirm:$false + CategoryInfo : InvalidData: (:) [Add-VdsVMHost], ParameterBindin...mationException + FullyQualifiedErrorId : ParameterArgumentTransformationError,VMware.VimAutomation.VdsComponent.Commands.Cmdlets.AddVdsVMHost Thoughts? I can't seem to find any good info on scripting Vds stuff?