Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 197835

Re: Migrating distributed vSwitch to new vCenter

$
0
0

The following code should return the clusters that have hosts connected to a specific vdSwitch

 

$tgtVDS="MyVDS"

$vds=Get-VDSwitch|where {$_.Name-eq$tgtVDS}$esxNames=@()$vds.ExtensionData.Config.Host|%{    $esxNames+=Get-View$_.Config.Host|Select-ExpandPropertyName
}Get-VMHost-Name$esxNames|Get-Cluster|SelectName

Viewing all articles
Browse latest Browse all 197835

Trending Articles