Last active
March 20, 2021 13:03
-
-
Save alex4rks/84e34b8758ccba514c26c747f0658157 to your computer and use it in GitHub Desktop.
useful for gpu-passthru vms
This file contains hidden or 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
| #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