Skip to content

Instantly share code, notes, and snippets.

@alex4rks
Last active March 20, 2021 13:03
Show Gist options
  • Select an option

  • Save alex4rks/84e34b8758ccba514c26c747f0658157 to your computer and use it in GitHub Desktop.

Select an option

Save alex4rks/84e34b8758ccba514c26c747f0658157 to your computer and use it in GitHub Desktop.
useful for gpu-passthru vms
#https://stackoverflow.com/a/47262639
$devices = Get-PnpDevice| where {$_.class -eq "Display" -and $_.FriendlyName -notmatch "^.*Microsoft.*|^.*Basic.*|^.*Vmware.*"}
foreach ($dev in $devices) {
$dev | Disable-PnpDevice -Confirm:$false
$dev | Enable-PnpDevice -Confirm:$false
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment