Uncategorized

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:

Name
Description
Get-VirtualSwitch
Returns both standard and distributed switches. You can filter the retrieved switches by their type.
Get-VirtualPortGroup
Returns the virtual port groups of the specified standard and distributed switches.
Get-VMHost
You can retrieve the hosts that are connected to a specific distributed switch.
Get-VM
You can retrieve the virtual machines that are connected to a specific distributed switch.
Get-VMHostNetworkAdapter
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.

Example:

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:

Comments

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. 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.

  3. 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. Required fields are marked *