Skip to content

Instantly share code, notes, and snippets.

@poshcodebear
Created July 31, 2015 05:53
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 poshcodebear/31d408df7aefcce82969 to your computer and use it in GitHub Desktop.
Save poshcodebear/31d408df7aefcce82969 to your computer and use it in GitHub Desktop.
Get VMWare network adapter types
$vms = Get-VM
$output = foreach ($vm in $vms) {
foreach ($adapter in $vm.NetworkAdapters) {
$props = @{'Name' = $vm.Name;
'Type' = $adapter.Type}
$obj = New-Object -TypeName PSObject -Property $props
Write-Output $obj
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment