Flings
Apps and tools built by our engineers that are intended to be played with and explored.

VDSPowerCli

VDSPowerCli

Summary

PowerShell is a scripting language Microsoft developed to help administrators manage the Windows environment. Third parties can write their own snap-ins (dynamic linked libraries) to implement new commands, which are called cmdlets. With VDSPowerCli, users can use the cmdlets provided by PowerCLI to manage vSphere Distributed Switch(VDS).

Features

VDSPowerCli gives you the ability to manage:

  • VMware vSphere Distributed Switch
  • Distributed Port Group
  • Distributed Port

System Requirements

Must have already installed the following:

  • Windows platform required (support XP, Windows Server 2003 & 2008, Windows Vista and Windows 7).
  • VMware PowerCli 4.1.1 or later preinstalled.

Instructions

Install the following:

  1. Download the .zip file and extract it
  2. Run setup.exe
  3. If any kind of warning come up saying 'you haven't set the execution policy to remote signed', please run PowerShell and in its console run 'Set-ExecutionPolicy RemoteSigned' and confirm it.
  4. After installation, open PowerCli console and run "Add-PSSnapin VMware.VimAutomation.VdsComponent", then VDS cmdlets are available.

Video

Change Log

This recent change makes the objects returned by all the get- commands enumerable, which is required by pipeline process with command Select-Object.

Engineers


Susan Ma

Networking

Keqiang Li

Networking
Add Comment

73 thoughts on “VDSPowerCli

  1. Vikas Bains

    Please help me with below error:-

    PowerCLI C:\Program Files\VMware\Infrastructure\vSphere PowerCLI> Get-Vds -Location “New Datacenter”

    Get-Vds : 7/15/2013 9:25:24 AM Get-Vds Method not found: ‘System.Collections.Generic.List`1 VMware.VimAutomation.ViCore.Util10Ps.CommonUtil.FilterCollection(System.Collections.Generic.IEnumerable`1, System.String, System.Collections.Generic.IEnumerable`1)’.
    At line:1 char:8
    + Get-Vds <<< Get-Vds

    Get-Vds : 7/15/2013 9:26:32 AM Get-Vds Method not found: ‘System.Collections.Generic.List`1 VMware.VimAutomation.ViCore.Util10Ps.Commo
    nUtil.FilterCollection(System.Collections.Generic.IEnumerable`1, System.String, System.Collections.Generic.IEnumerable`1)’.
    At line:1 char:8
    + Get-Vds <<<<
    + CategoryInfo : NotSpecified: (:) [Get-Vds], VimException
    + FullyQualifiedErrorId : Core_BaseCmdlet_UnknownError,VMware.VimAutomation.VdsComponent.Commands.Cmdlets.GetDistributedSwitch

    Reply
    1. Atanas Atanasov

      That looks like you are using a newer version of PowerCLI that is not supported. If you use PowerCLI 5.1 R2 or higher, it has out-of-the-box support for VDS and you don’t need this fling. The equivalent command there is:
      Get-VDSwitch -Location “New Datacenter”

      Reply
  2. Steffen Plotner

    I absolutely cannot believe that we spend thousands of dollars to vmware to not be able to automate Get-VdsDVPortTeamingPolicy in the current powershell environment. Automation is required, point-and-click is not the way of the future!

    Reply
    1. Vladimir Goranov

      Hello Trevor,

      Latest version released on Feb 11th, 2013 does support vDS functionality as described below:

      The new vSphere PowerCLI VDS snap-in provides extended options for managing host-wide networking with distributed switches and port groups.
      • Add and remove hosts on a distributed switch.
      • Connect and disconnect physical network adapters to a distributed switch.
      • Retrieve, create, modify, and remove distributed switches.
      • Retrieve, create, modify, and remove distributed port groups.
      • Import, clone, and rollback the configuration of a distributed switch or a distributed port group.
      • Export distributed switch and distributed port group configurations to .zip archives on your disk. You can later import them to create new distributed switches and port groups, or to modify existing ones

      Hope that helps,
      Vladimir

      Reply
      1. Jon

        Does anyone know what the deal with PowerCLI 5.5 and the cmdlets it contains, vs. this VDSPoweCLI fling? It seems its missing Move-VdsVMHostNetworkAdapter specifically-

        Get-Command -Module VMware.VimAutomation.Vds

        CommandType Name ModuleName
        ———– —- ———-
        Cmdlet Add-VDSwitchPhysicalNetworkAdapter VMware.VimAutomation.Vds
        Cmdlet Add-VDSwitchVMHost VMware.VimAutomation.Vds
        Cmdlet Export-VDPortGroup VMware.VimAutomation.Vds
        Cmdlet Export-VDSwitch VMware.VimAutomation.Vds
        Cmdlet Get-VDBlockedPolicy VMware.VimAutomation.Vds
        Cmdlet Get-VDPort VMware.VimAutomation.Vds
        Cmdlet Get-VDPortgroup VMware.VimAutomation.Vds
        Cmdlet Get-VDPortgroupOverridePolicy VMware.VimAutomation.Vds
        Cmdlet Get-VDSecurityPolicy VMware.VimAutomation.Vds
        Cmdlet Get-VDSwitch VMware.VimAutomation.Vds
        Cmdlet Get-VDSwitchPrivateVlan VMware.VimAutomation.Vds
        Cmdlet Get-VDTrafficShapingPolicy VMware.VimAutomation.Vds
        Cmdlet Get-VDUplinkLacpPolicy VMware.VimAutomation.Vds
        Cmdlet Get-VDUplinkTeamingPolicy VMware.VimAutomation.Vds
        Cmdlet New-VDPortgroup VMware.VimAutomation.Vds
        Cmdlet New-VDSwitch VMware.VimAutomation.Vds
        Cmdlet New-VDSwitchPrivateVlan VMware.VimAutomation.Vds
        Cmdlet Remove-VDPortGroup VMware.VimAutomation.Vds
        Cmdlet Remove-VDSwitch VMware.VimAutomation.Vds
        Cmdlet Remove-VDSwitchPhysicalNetworkAdapter VMware.VimAutomation.Vds
        Cmdlet Remove-VDSwitchPrivateVlan VMware.VimAutomation.Vds
        Cmdlet Remove-VDSwitchVMHost VMware.VimAutomation.Vds
        Cmdlet Set-VDBlockedPolicy VMware.VimAutomation.Vds
        Cmdlet Set-VDPort VMware.VimAutomation.Vds
        Cmdlet Set-VDPortgroup VMware.VimAutomation.Vds
        Cmdlet Set-VDPortgroupOverridePolicy VMware.VimAutomation.Vds
        Cmdlet Set-VDSecurityPolicy VMware.VimAutomation.Vds
        Cmdlet Set-VDSwitch VMware.VimAutomation.Vds
        Cmdlet Set-VDTrafficShapingPolicy VMware.VimAutomation.Vds
        Cmdlet Set-VDUplinkLacpPolicy VMware.VimAutomation.Vds
        Cmdlet Set-VDUplinkTeamingPolicy VMware.VimAutomation.Vds
        Cmdlet Set-VDVlanConfiguration VMware.VimAutomation.Vds

        I would rather not have to create a new VMKernel on a VSS, and remove the VNic on the VDS, specifically since I imagine I would need to use IP addresses to avoid a conflict. Using this link-

        http://nutzandbolts.wordpress.com/2013/08/16/migrate-esxi-host-and-guests-from-1000v-vds-to-standard-switch-using-powercli/comment-page-1/#comment-418

        .. as a reference to migrated from VDS to VSS and am running into issues w/ the vMotion, and NFS portgroup migrations.

        Thanks,
        Jon

        Reply
  3. Javier Oropesa

    I am creating a new vDS based on a export I took using the Export-VDS cmdlet. Everything works well with the exception that all the portgroups that get created get the name of the VDS prepended to their names. For example, I run the following:

    New-VDS -Name VDS -Location “DC” -Profile C:\location\import.xml

    In the import.xml file, let’s assume that the portgroup names are PG1, PG2, PG3, etc. As soon as the import process runs, I see the new VDS created. but the port group names are now VDSPG1, VDSPG2, etc…

    Reply
    1. Javier Oropesa

      I was able to work around it by running the following after the import to cleanup the names.
      The filter for not matching “*DVUplink*” was so that the return values would not include the DVUplink, which automatically are named with the DVS name from being included in the loop.

      $DPGs = Get-VdsDistributedPortgroup | WHERE -Filterscript {$_.Name -notlike “*DVUplink*”}
      foreach($DPG in $DPGs)
      {Set-VdsDistributedPortGroup -DVPortgroup $DPG -Name $DPG.Name.Replace(“VDS”,””)}

      This immediately went in and cleaned up the names. I am thinking that for the Create-VDS cmdlet, the DVPortGroup name somehow is getting concatenated with the DVS name for some reason.

      Reply
      1. Javier Oropesa

        Just found that the VLAN IDs in the imported xml file do not get applied to the DVPortgroups. Had to expand on the script above to add the VLAN IDs. Luckily our DVPortgroup names contain the VLAN ID so it was easy to pass the value from a substring of the DVPortgroup name.

        Would be nice to see the New-VDS cmdlet updated if it ever gets introduced formally into PowerCLI or if a fling update comes out.

        Reply
  4. tej

    Hi ,

    when i execute Get-Vds cmdlet i get below error:

    Get-Vds : 1/4/2013 2:24:10 PM Get-Vds Method not found: ‘System.Colle
    ctions.Generic.List`1 VMware.VimAutomation.ViCore.Util10Ps.CommonUtil.Filt
    erCollection(System.Collections.Generic.IEnumerable`1, System.String, Syst
    em.Collections.Generic.IEnumerable`1)’.
    At line:1 char:8
    + get-vds <<<<
    + CategoryInfo : NotSpecified: (:) [Get-Vds], VimException
    + FullyQualifiedErrorId : Core_BaseCmdlet_UnknownError,VMware.VimAutomatio
    n.VdsComponent.Commands.Cmdlets.GetDistributedSwitch

    Reply
    1. alpacapowered

      tej, you’re probably using PowerCLI 5.1. This fling/cmdlet apparantly works with PowerCLI 5.0 only.

      I really hope those cmdlets will be built into the base PowerCLI package soon.
      Also, the -whatif switch of New-VdsDistributedPortgroup seems broken.

      Reply
  5. Lars Wean

    Hi,

    Is this supported with PowerCLI 5.1.0 R1 ? Got the following problem/error message


    PowerCLI C:\> Get-Vds -Name bf-havmware-dvSwitch01
    Get-Vds : 26.11.2012 12:19:56 Get-Vds Method not found: ‘System.Collections.Generic.List`1VMware.VimAutomation.ViCore.Util10Ps.CommonUtil.FilterCollection(System.Collections.Generic.IEnumerable`1, System.String, System.Collections.Generic.IEnumerable`1)’.
    At line:1 char:8
    + Get-Vds <<<< -Name bf-havmware-dvSwitch01
    + CategoryInfo : NotSpecified: (:) [Get-Vds], VimException
    + FullyQualifiedErrorId : Core_BaseCmdlet_UnknownError,VMware.VimAutomation.VdsComponent.Commands.Cmdlets.GetDistributedSwitch

    Reply
  6. Hunter

    Please help, I get the error below when trying to set get-vds as a variable.

    PowerCLI C:\Windows\system32> $vds = get-vds
    get-vds : 9/21/2012 1:58:44 PM Get-Vds Method not found:
    ‘System.Collections.Generic.List`1 VMware.VimAutomation.ViCore.Util10Ps.CommonUtil.FilterColle
    ction(System.Collections.Generic.IEnumerable`1, System.String,
    System.Collections.Generic.IEnumerable`1)’.
    At line:1 char:8
    + $vds = get-vds
    + ~~~~~~~
    + CategoryInfo : NotSpecified: (:) [Get-Vds], VimException
    + FullyQualifiedErrorId : Core_BaseCmdlet_UnknownError,VMware.VimAutomation.VdsComponent.Comma
    nds.Cmdlets.GetDistributedSwitch

    Reply
    1. keqiang li

      hi,

      I wonder which version of PowerCLI you are using.
      Since VDSPowerCLI 4.1.1 is a fling based on PowerCLI 4.1.1, newer version of PowerCLI may not support VDSPowerCLI 4.1.1. (we are trying to merge VDSPowerCLI into PowerCLI, which will resolve all these troubles)

      Thanks.

      Reply
  7. Alex Ascherl

    Hi,

    im looking for a solution for simple backup and restore a vds.
    Backup works but there are no vlans exported in my output file.

    All entries show vlan 0
    These means that my import (restore) is not usable

    Alex

    Reply
    1. keqiang li

      hi,

      would you please email me with the details of the issue, such as what commands you have run, what configuration your vds is and what you got in your output file.

      Thanks.

      Reply
  8. Oliver

    Hi Kenneth,

    thanks for your plugin. I tried to use it for a farm migration to a new vCenter with a new database. Wanted to save the current Switchconfig and deploy it in the new system. Export is successful, but when I try to import the settings in a new switch I receive the following message:
    [vSphere PowerCLI] C:\users\user026\desktop> new-vds -Name TestSwitch -Location $dc -Profile .\ExportVDS_MGMT.xml
    New-Vds : 8/16/2012 4:39:52 PM New-Vds String was not recognized as a valid Boolean.
    At line:1 char:8
    + new-vds <<<< -Name TestSwitch -Location $dc -Profile .\ExportVDS_MGMTTalanx.xml
    + CategoryInfo : NotSpecified: (:) [New-Vds], VimException
    + FullyQualifiedErrorId : Core_BaseCmdlet_UnknownError,VMware.VimAutomation.VdsComponent.Commands.Cmdlets.NewDistributedSwitch

    Reply
    1. Keqiang Li

      same scripts work properly on my VC.
      I’ve never seen a error “String was not recognized as a valid Boolean”. We don’t have a Boolean parameter here.

      Can you provide more details?

      Reply
  9. Raymond Phoon

    The Move-VdsVMHostNetworkAdapter doesn’t seem to be taking the VlanID argument when moving VirtualNics. Error below:

    Move-VdsVMHostNetworkAdapter : Cannot validate argument on parameter ‘VlanId’. The argument “200″ does not belong to the set “0,4095″ specified by the ValidateSet attribute. Supply an argument that is in the set and then try the command a
    gain.
    At line:1 char:117
    + $MovingVMK | Move-VdsVMHostNetworkAdapter -VirtualSwitch $newSwitch -PortgroupLabel $MovingVMK.PortGroupName -VlanId <<<< "200"
    + CategoryInfo : InvalidData: (:) [Move-VdsVMHostNetworkAdapter], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationError,VMware.VimAutomation.VdsComponent.Commands.Cmdlets.Move
    VdsVMHostNetworkAdapter

    Reply
    1. Keqiang Li

      Only Vlan Type “None(0)” and “All(4095)” are supported when you move a vmknic from VDS to standard VirtualSwitch.

      following are some examples of this command:
      # Move physical nic to VDS
      Move-VdsVMHostNetworkAdapter -PhysicalNic $nic[0] -Vds dvSwitch1

      # Move vmknic from VSS to VDS
      Move-VdsVMHostNetworkAdapter -VirtualNic $vmknic[0] -DVPortGroup $dvportgroup[1] -Force

      # Move vmknic from VDS to VSS
      Move-VdsVMHostNetworkAdapter -VirtualNic $vmknic[0] -VirtualSwitch vswitch1 -PortGroupLabel vmkernel1 -VlanId 0 -Force

      Thanks

      Reply
  10. meda

    is there a command to remove uplink from the dvswitch using powercli.
    example:

    i have 4 uplinks to dvswitch on everyhost and would like to remove one of the uplink from everyhost using powercli. is this possible?

    Reply
  11. Al Grandville

    I’m attempting to make changes to my vDS settings. I.e change the MTU size.
    Here is my script:

    $vds = Get-Vds -Location “Datacenter Site A”
    Set-Vds -Vds $vds[1] -Mtu 1600

    I get an error on the ‘Set-Vds’ command “Object reference not set to an instance of an object”

    Any guidance would be greatly appreciated. Thanks !

    Reply
  12. creis

    Hi !

    Perhaps some vDS experts can help here…

    I’ve got an _existing_ and _working_ vDS on my vCenter server (vsphere 4.1, Nexus 1000v).

    “Get-Vds” returns nothing
    “Get-VirtualSwitch -Distributed” returns nothing

    yet using “Get-View -ViewType DistributedVirtualSwitch -Filter @{}” returns my distributed vswitch OK.

    I’m even able to use the object returned to do powershell provisionning using DVSConfigSpec for adding hosts into this “ghost” dvs.

    Any idea where to look ?

    Many thanks for any kind of pointer you could provide.

    Reply
    1. Keqiang Li

      hi creis,

      I never saw this problem before. Get-VirtualSwitch is a command in PowerCLI which is a released product and this one should work, at least using Get-VirtualSwitch with no parameters will return all the switches, including VDS and VSS; so I think it’s not an issue of Get-Vds cmdlet.

      Thanks.

      Reply
  13. Luke @ThepHuck

    I installed this in PowerCLI 5.0.1 on Win2k8r2, running 32-bit PS and cannot create port groups:
    New-VdsDistributedPortgroup : Cannot process argument transformation on parameter ‘Vds’. Unexpected error occured. The string wrapper for type VMware.VimAutomation.VdsCo
    mponent.Types.V1.VdsVSphereDistributedSwitch is not defined
    At line:1 char:51
    + New-VdsDistributedPortgroup -name 172.17.66.0 -vds <<<< AR-Cert-vDS -VlanId 1766 -VlanType VLAN -NumPorts 256 -Confirm:$false
    + CategoryInfo : InvalidData: (:) [New-VdsDistributedPortgroup], ParameterBindin…mationException
    + FullyQualifiedErrorId : ParameterArgumentTransformationError,VMware.VimAutomation.VdsComponent.Commands.Cmdlets.NewDVPortgroup

    I can do a get-vds and it lists the switch. I tried putting the switch in quotes, no go, as well as matching case and/or tabbing the switches, still fail.

    Thoughts?

    Reply
    1. Keqiang Li

      Currently you need to pass the vds object to the -vds option or use pipeline

      example:

      $vds=get-vds
      new-vdsdistributedportgroup -name 172.17.66.0 -vds $vds[0]

      Reply
  14. Hasan

    Hello

    I am trying to script to change all the dvportgroups teaming and failover policy to route based on physical nic load . Bu I can not fid the string option for this parameter.

    I have this

    Get-VdsDistributedPortgroup -name test2 | Set-VdsDVPortTeamingPolicy -LoadBalance “?”

    What would that be ?

    Thanks

    Reply
    1. Vamshi Meda

      this works

      Get-VdsDistributedPortgroup -name $portgroup | Set-VdsDVPortTeamingPolicy -LoadBalance “loadbalance_srcid” -FailOverDetection “Link Status Only”

      Reply
      1. Vamshi Meda

        physical nic load :

        Get-VdsDistributedPortgroup -name $portgroup | Set-VdsDVPortTeamingPolicy -LoadBalance “loadbalance_loadbased” -FailOverDetection “Link Status Only”

        Reply
  15. Terry Wilson

    Command completes ok but nothing happens

    $nic_0 = get-vmhostnetworkadapter -VMHost “$host” | where { $_.Name -eq “vmnic0″ }
    $vds = Get-Vds $Switchname
    Move-VdsVMHostNetworkAdapter -physicalnic $nic_1 -vds $vds

    However it does work correctly to migrate vmk interfaces across

    $dvpg_vmotion = Get-VdsDistributedPortgroup -vds $vds | Where { $_.Name -eq “VMOTION-1″ }
    $nic_vmotion = get-vmhostnetworkadapter -VMHost “$host” | where { $_.IP -eq $vmotionip }
    Move-VdsVMHostNetworkAdapter -VirtualNic $nic_vmotion -DVPortgroup $dvpg_vmotion -Confirm:$false

    Using Powercli 5 against vcentre 5

    Reply
    1. Keqiang Li

      To move a pnic of a host to vds, user should first add this host to the VDS.
      The correct script should be:

      $vds = Get-Vds $Switchname
      Add-VdsVMHost –VMHosts $host –Vds $vds // this command connects the host onto the VDS.
      $nic_0 = get-vmhostnetworkadapter -VMHost “$host” | where { $_.Name -eq “vmnic0″ }

      Move-VdsVMHostNetworkAdapter -physicalnic $nic_0 -vds $vds // If the host doesn’t yet connect to the VDS, this command will exit silently now, but I think it’s better to print some messages to the user.

      Thanks for your feedback.

      Reply
  16. Frank Nord

    Hi,
    i am trying to figure out how i add a distributed portgroup.
    i am unable to figure out whats the correct way to enter the dvSwitch name. It is simply named “dvSwitch” and i see it via Get-Vds but there is always some kind of error if i enter it.
    For example:
    PowerCLI C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI> New-VdsDistributedPortgroup dVLAN999 dvSwitch
    New-VdsDistributedPortgroup : Cannot process argument transformation on parameter ‘Vds’. Unexpected error occured. The string wrapper for type VMware
    .VimAutomation.VdsComponent.Types.V1.VdsVSphereDistributedSwitch is not defined
    At line:1 char:28
    + New-VdsDistributedPortgroup <<<< dVLAN999 dvSwitch
    + CategoryInfo : InvalidData: (:) [New-VdsDistributedPortgroup], ParameterBindin…mationException
    + FullyQualifiedErrorId : ParameterArgumentTransformationError,VMware.VimAutomation.VdsComponent.Commands.Cmdlets.NewDVPortgroup

    The error is the same if i enter -Vds in front of the dvSwitch name or not. Any hints? I have to enter a bunch of VLANs to the dvSwitch which would be manually way too much work.

    Reply
    1. Steve Kaplan

      The easiest way I found to do it is to pipe the dvSwitch parameter in before the new pg command (basically, the -vds switch does nothing). What my bit of code for that looked like was this:

      get-vds | new-vdsdistributedportgroup -name -NumPorts -VlanType VLAN -VlanID

      Reply
    2. Keqiang Li

      What you passed to the -VDS should be an object array of type VDS.
      You can try $vdsarray=get-vds
      and then use -VDS $vdsarray[1]

      Reply
  17. Steve Kaplan

    Is it possible to rename the dvuplinks? Or, to set the string for what to name them at time of creation? *That* would be helpful…

    Also, it doesn’t appear that specifying the version at time of creation has any impact.. Regardless of if I specify 4.0 or 4.1, I’m getting a 5.0 dvSwitch… Which isn’t going to help me for what I’m trying to do (create multiple 4.0 dvSwitches under vCenter 5.0)

    Reply
      1. Steve Kaplan

        Ok, so what command set would I use to rename the dvuplink names? Would it be part of set-vds? Or.. ?

        Reply
        1. Keqiang Li

          Yes, in set-vds, we added a parameter ‘-UplinkRenameMap’.

          an example:

          $vds=get-vds
          $map=@{“dvUplink1″=”test”;”dvUplink2″=”test2″}
          Set-Vds -Vds $vds[0] -UplinkRenameMap $map

          Reply
  18. Alith Anar

    Hello.

    I’m using Power CLI5.0.1.
    I whant to remove a vswitch using the following cmdlet:

    remove-vds -DistributedSwitch testvds

    But I get te following error:
    Remove-Vds : Die Argumenttransformation für den Parameter "DistributedSwitch" kann nicht verarbeitet werden. Unexpected
    error occured. The string wrapper for type VMware.VimAutomation.VdsComponent.Types.V1.VdsVSphereDistributedSwitch is n
    ot defined
    Bei Zeile:1 Zeichen:30
    + remove-vds -DistributedSwitch <<<< testvds
    + CategoryInfo : InvalidData: (:) [Remove-Vds], ParameterBindin...mationException
    + FullyQualifiedErrorId : ParameterArgumentTransformationError,VMware.VimAutomation.VdsComponent.Commands.Cmdlets.
    RemoveDistributedSwitch

    I found no solution on google. Any ideas why the error occures?
    Thank you
    Regards Thomas

    Reply
    1. Keqiang Li

      That’s an issue you can find from the KnownIssues.txt after installation.
      Currently, there is a bug that we can’t convert the name of a VDS to the obn object.
      So what you should do is using the pipeline as below:

      $dvsarray=get-dvs;
      remove-vds -vds $dvsarray[1] or any index of the switch you want to remove

      Reply
  19. Chad King

    This happens when I run
    PS Z:\apps> Get-VdsDistributedPortgroup | Get-VdsDVPortTeamingPolicy | Export-CS
    V PHX-UCS-FWVC01-VDS-LB.csv

    Client DVPortgroupId DVPortId Inherited FailBack FailOverDetectionPolicy LoadBalancePolicy NotifySwitches UplinkPortOrderPolicy ExtensionData
    VMware.VimAutomation.ViCore.Impl.V1.VimClient DistributedVirtualPortgroup-dvportgroup-118 FALSE VMware.VimAutomation.VdsComponent.Types.V1.BoolPolicy VMware.VimAutomation.VdsComponent.Types.V1.StringPolicy VMware.VimAutomation.VdsComponent.Types.V1.StringPolicy VMware.VimAutomation.VdsComponent.Types.V1.BoolPolicy VMware.VimAutomation.VdsComponent.Types.V1.UplinkPortOrderPolicy VMware.Vim.VmwareUplinkPortTeamingPolicy

    Reply
    1. Chad King

      I dont ever get load balancing output… I have about 100+ portgroups to get LB policies (yes some guy thought it was a great idea to not set this at the DVswitch level…)

      Reply
      1. Keqiang Li

        hi Chad,

        Sorry for such a late reply.
        You need to pipe the output to select * to get all the fields of the policy object.
        Since the data structures in a policy object, e.g. a TeamingPolicy object, are not all of simple types, so you can just see what their types are when dump a policy object(such as StringPolicy). To see their values, you need to use ‘.’ to refer to the members.
        Following is an example:
        $policy is a teaming policy object.
        $policy.UplinkPortOrderPolicy

        Reply
  20. Chad King

    Okay, So I have been playing with this for a bit now… and maybe someone can help me figure out how I can creatively dump all load balancing policies for port groups on a Dvswitch.

    I keep getting some fields but mostly a Inherited > False… Maybe I am doing something wrong.

    Reply
  21. LucD

    I tried to use the snapin in PowerCLI 5 but I keep getting

    PowerCLI C:\> Get-Vds -Name *
    Get-Vds : 10-11-2011 11:22:50 Get-Vds Could not load file or assembly
    ‘VMware.Vim, Version=4.1.1.0, Culture=neutral, PublicKeyToken=10980b081e887e9f
    ‘ or one of its dependencies. The system cannot find the file specified.
    At line:1 char:8
    + Get-Vds <<<< -Name *
    + CategoryInfo : NotSpecified: (:) [Get-Vds], VimException
    + FullyQualifiedErrorId : Core_BaseCmdlet_UnknownError,VMware.VimAutomatio
    n.VdsComponent.Commands.Cmdlets.GetDistributedSwitch

    Since the requirements state PowerCLI 4.1.1 or higher I assumed it would work with PowerCLI 5 as well.
    Am I wrong in my assumption ?
    Or am I doing something wrong ?

    Reply
    1. Keqiang Li

      We found some hard-coded issues in our code; will soon fix it.
      Your can play with PowerCLI 4.1.1 for the moment.
      Thanks for your feedback.

      Reply
  22. Roey Azroel

    Hi,

    What is the different between the dvs commands that the basic powercli 4.1.1 have and vdsPowerCLI?

    Thanks,

    Roey

    Reply
    1. Keqiang Li

      Hi Roey,

      PowerCli has a very limited set of VDS related operations while VDSPowerCli makes it up with lots of useful commands.
      To see what have been added in VDSPowerCli, just run ‘Get-Command -Module VMware.VimAutomation.VdsComponent’ in PowerCli console. It’s easy to learn what every command does from its name.

      For you convenience, I list them below:
      CommandType Name Definition
      ———– —- ———-
      Cmdlet Add-VdsVMHost Add-VdsVMHost [-Vds <VdsVSph...
      Cmdlet Apply-VdsDVPortPolicyProfile Apply-VdsDVPortPolicyProfile...
      Cmdlet Export-VdsDVPortgroupProfile Export-VdsDVPortgroupProfile...
      Cmdlet Export-VdsDVPortPolicyProfile Export-VdsDVPortPolicyProfil...
      Cmdlet Export-VdsProfile Export-VdsProfile [-FilePath...
      Cmdlet Get-Vds Get-Vds [[-Name] ]…
      Cmdlet Get-VdsDistributedPortgroup Get-VdsDistributedPortgroup …
      Cmdlet Get-VdsDVPort Get-VdsDVPort [[-Key] <Strin…
      Cmdlet Get-VdsDVPortBlockedPolicy Get-VdsDVPortBlockedPolicy [...
      Cmdlet Get-VdsDVPortgroupPolicy Get-VdsDVPortgroupPolicy [-D...
      Cmdlet Get-VdsDVPortSecurityPolicy Get-VdsDVPortSecurityPolicy ...
      Cmdlet Get-VdsDVPortShapingPolicy Get-VdsDVPortShapingPolicy [...
      Cmdlet Get-VdsDVPortTeamingPolicy Get-VdsDVPortTeamingPolicy [...
      Cmdlet Get-VdsVMHost Get-VdsVMHost [-Vds <VdsVSph...
      Cmdlet Move-VdsVMHostNetworkAdapter Move-VdsVMHostNetworkAdapter...
      Cmdlet New-Vds New-Vds [-Name] [-V...
      Cmdlet New-VdsDistributedPortgroup New-VdsDistributedPortgroup ...
      Cmdlet Remove-Vds Remove-Vds [[-DistributedSwi...
      Cmdlet Remove-VdsDistributedPortgroup Remove-VdsDistributedPortgro...
      Cmdlet Remove-VdsVMHost Remove-VdsVMHost [-Vds <VdsV...
      Cmdlet Set-Vds Set-Vds [-Vds] <VdsVSphereDi…
      Cmdlet Set-VdsDistributedPortgroup Set-VdsDistributedPortgroup …
      Cmdlet Set-VdsDVPort Set-VdsDVPort [[-DVPort] <Vd…
      Cmdlet Set-VdsDVPortBlockedPolicy Set-VdsDVPortBlockedPolicy […
      Cmdlet Set-VdsDVPortgroupPolicy Set-VdsDVPortgroupPolicy [-D…
      Cmdlet Set-VdsDVPortSecurityPolicy Set-VdsDVPortSecurityPolicy …
      Cmdlet Set-VdsDVPortShapingPolicy Set-VdsDVPortShapingPolicy […
      Cmdlet Set-VdsDVPortTeamingPolicy Set-VdsDVPortTeamingPolicy […

      Thanks.

      Reply
  23. Mike R

    Ran the install on both XP SP2 and W2KR8, completed successfully. Trying to run the ‘Add-PSSnapin VMware.VimAutomation.VdsComponent’ line returns:
    ———————
    Add-PSSnapin : The Windows PowerShell snap-in ‘VMware.VimAutomation.VdsComponent’ is no
    t installed on this machine.
    At C:\Users\miker\AppData\Local\Temp\2\124b1fbf-f323-44a3-8da5-9b9894cc7c5d.ps1:1 cha
    r:13
    + Add-PSSnapin <<<< VMware.VimAutomation.VdsComponent
    + CategoryInfo : InvalidArgument: (VMware.VimAutomation.VdsComponent:Stri
    ng) [Add-PSSnapin], PSArgumentException
    + FullyQualifiedErrorId : AddPSSnapInRead,Microsoft.PowerShell.Commands.AddPSSnapi
    nCommand
    ——————–
    However 'get-pssnapin' shows it as installed, but running 'Get-Command –Module VMware.VimAutomation.VdsComponent' returns nothing?: Also shows versions VMware vSphere PowerCLI 4.1 U1 build 332441 SnapinVersions {VMWare VDSPowerCLI 1.0 build 0, VMWare vSphere PowerCLI 4.1 U1 build 332441}

    ——————-
    Name : VMware.VimAutomation.VdsComponent
    PSVersion : 2.0
    Description : This Windows PowerShell snap-in contains Windows PowerShell cmdlets used to
    manage VMware vNetwork Distributed Switch.

    Reply
    1. Keqiang Li

      Hi Mike,

      Thanks for your feedback.

      I’m not sure why this issue happened to you. I performed another round of testings on XP 32-bit and everything worked well.
      Could you please run ‘get-pssnapin -registered’ to confirm whether ‘VMware.VimAutomation.VdsComponent’ exists.
      If not, I suggest you uninstall you VDSPowerCli first and then PowerCli. Reinstall them following our instructions. If the problem still occur, could you please offer some screen shots or exactly the steps of your installation for me to track it down?

      Thank you very much.

      Reply
          1. Jonathon

            I do, and I see the same problem. It looks like it works in the 32bit PCLI but not 64bit. Has anyone else seen that?

            Reply
            1. Carlos Martinez

              I am trying to run the VDS snap-ip from a Windows 2008 R2 server and I keep getting the same error message.
              However, the snap-in works correctly on a 32-bit Windows 7 workstation.
              Has there been any resolution this issue since it was originally posted?
              Thanks.

              Reply
  24. Hal Rottenberg

    I’m unable to install. “The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2869.”. Just tried it on two 64-bit Win7 computers, same issue. Installer corrupt maybe?

    Reply
      1. Keqiang Li

        Win 7 and Vista are already supported now. Only PowerCli 4.1.1 or later are supported to resolve the issues.

        PS: Error code 2869 indicates a UAC error in Win7 and Vista. It’s supposed to be resolved by some means, but I failed after tried several.

        Reply
      2. al hakimov

        I got the same error 2869. You should install it from command line, open cmd as administrator, then run this .msi, which should install fine.

        Reply
    1. Hal Rottenberg

      I got it working on Win7.
      1. right-click, choose Troubleshoot Compatibility
      2. click “start the program” once the compat shim determines what it needs to do
      3. finish installer
      4. Open a 32-BIT PowerCLI or PowerShell console (doesn’t appear to be a 64-bit snap-in included)

      Reply
      1. Keqiang Li

        If you install VDSPowerCli on a clean Win7 with PowerCli 4.1.1 preinstalled, you won’t run into the issue.

        Using 32-Bit PowerCli console works well since I think PowerCli is a 32-bit application.

        Reply
      2. Keqiang Li

        Sorry for my misunderstanding of PowerCli, actually it supports 64-bit windows too. Current issue is VDSPowerCli cannot be a snap-in for 64-bit PowerCli.

        Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>