Created
December 11, 2013 18:46
-
-
Save jcpowermac/7916110 to your computer and use it in GitHub Desktop.
vSphere ESXi PCI Passthru
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
$vmhosts = Get-VMHost | |
foreach( $vmhost in $vmhosts ) | |
{ | |
$hcv = $vmhost | Get-View | Select Config | |
$hcmv = $vmhost | Get-View | Select ConfigManager | |
$pci = Get-View -Id $hcmv.ConfigManager.PciPassthruSystem | |
$pci.Refresh(); | |
$ptis = $hcv.Config.PciPassthruInfo; | |
foreach( $pti in $ptis ) { | |
if( $pti.PassthruCapable -eq "True" ) { | |
$vmhost; | |
break; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment