Raheman M. Abdul
asked on
Get HyperV Team name the given virtual Switch (name provided) is connected ?
Hi Guys
Using Powershell, How to get Hyper-V Team name the given virtual switch is connected to?
Thank you
Using Powershell, How to get Hyper-V Team name the given virtual switch is connected to?
Thank you
ASKER
looking for complete command please if possible
ASKER
This worked. Found myself.
Thanks for expert's inputs.
Thanks for expert's inputs.
$vSwitchName = "XYZ"
Try
{
$vmnetswitch = Get-VMSwitch -Name $vSwitchName
$vmnetwork = Get-NetAdapter -InterfaceDescription $($vmnetswitch.NetAdapterInterfaceDescription)
if($vmnetwork)
{
write-host "vSwitch $($vSwitchName) is connected to $($vmnetwork.Name) Network team"
}
else
{
write-host "vSwitch $($vSwitchName) is NOT Found connected to any Network team"
}
}
catch
{
Write-host "Error Getting vSwitch Info"
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Open in new window
This document should give you a good understanding of NIC teaming with powershell :
http://techgenix.com/windows-nic-teaming-using-powershell-part/
http://techgenix.com/windows-nic-teaming-using-powershell-part6/