Created
July 31, 2015 05:53
-
-
Save poshcodebear/31d408df7aefcce82969 to your computer and use it in GitHub Desktop.
Get VMWare network adapter types
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$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