Skip to content

Instantly share code, notes, and snippets.

@PlagueHO
Last active April 8, 2016 06:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PlagueHO/fc07435c7321be0f7ba072f3da601c84 to your computer and use it in GitHub Desktop.
Save PlagueHO/fc07435c7321be0f7ba072f3da601c84 to your computer and use it in GitHub Desktop.
Get a list of Physical Network Adapters that are bound to External Virtual Switches
$MacAddress = `
(Get-VMNetworkAdapter `
-ManagementOS `
-Name (Get-VMSwitch | ? {
$_.SwitchType -eq 'External'
}).Name).MacAddress
Get-NetAdapter -Physical | ? {
($_.MacAddress -replace '-','') -in $MacAddress
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment