in Remove-VSwitch.ps1

Feb 25, 2010 at 1:03 PM

First, I'm sorry I am not good at Englisth.

Msvm_VLANEndpoint.ElementName is not unique.

How if "Associators of $virtualSwitch where assocClass=Msvm_VLANEndpoint" is used ?

           $intSP        = Get-WmiObject -computername $server -Namespace $HyperVNamespace -Query "select * from msvm_vlanendpoint where elementName = '$($VirtualSwitch.ElementName)_InternalPort' "
           $ExtSP        = Get-WmiObject -computername $server -Namespace $HyperVNamespace -Query "select * from msvm_vlanendpoint where elementName = '$($VirtualSwitch.ElementName)_ExternalPort' "