Enhanced Support for Distributed Switches in PowerCLI 4.1.1

Support for managing distributed switches was initially introduced in PowerCLI 4.1. In PowerCLI 4.1.1,  we extend this functionality by making changes to the following cmdlets:

Returns both standard and distributed switches. You can filter the retrieved switches by their type.
Returns the virtual port groups of the specified standard and distributed switches.
You can retrieve the hosts that are connected to a specific distributed switch.
You can retrieve the virtual machines that are connected to a specific distributed switch.
You can retrieve the host network adapters that are connected to a specific distributed switch.
New-NetworkAdapter, Set-NetworkAdapter
You can attach network adapters to a specific Port Id of the distributed switch.


By using PowerCLI cmdlets, you can migrate virtual machines and hosts between distributed virtual switches, and also create various reports related to distributed switches.


To list all distributed switches available in the vCenter Server, you can just run the Get-VirtualSwitch cmdlet:

The port groups on the distributed switch are also easy to retrieve:

If you need to get the hosts connected to the distributed switch, just filter them by using the Get-VMHost cmdlet:

Even more, you can check which host network adapters are connected to a specific distributed switch:

To check which virtual machines are part of a distributed switch network, use the DistributedSwitch parameter of the Get-VM cmdlet:


14 comments have been added so far

  1. I love the expanded dvswitch support, but I have to say, the added DistributedSwitch parameter on get-vmhost & get-vm does not make sense when I read it. The only other type of filter you have on these cmdlets now are by name, datastore, and location. I guess “network location” is a good way to filter, however, it feels a bit weird. I don’t know, maybe as I use it it will make more sense.
    I’d rather just type get-virtualswitch | get-vmhost though.

  2. Wäre ich zum Doc gegangen, hätte er mir wahrscheinlich Medikamente
    verschrieben, die ich ein Leben lang h√§tte einnehmen m√ľssen.

  3. I have been absent for some time, but now I remember why I used to love this website. Thank you, I¡¦ll try and check back more frequently. How frequently you update your site?

  4. May I just say what a comfort to find a person that actually
    understands what they are talking about online.
    You definitely understand how to bring a problem to light and make it important.
    More people really need to read this and understand this side of your story.
    I was surprised you aren’t more popular since
    you most certainly have the gift.

  5. In Alexa devices many ring lights occur but not everyone knows their meaning. So in that situation we are unable to understand what to do. So if you are facing any type of ring light issue in your Alexa device then you can call Geeks for Tech any time. Here we provide you exact information about those lights and solutions for them. Geek Squad

Leave a Reply

Your email address will not be published.