Skip to content

Instantly share code, notes, and snippets.

@pgebert
Created December 6, 2023 10:46
Show Gist options
  • Save pgebert/2ba3a2db7a50a74ea9bc4db25b85efb2 to your computer and use it in GitHub Desktop.
Save pgebert/2ba3a2db7a50a74ea9bc4db25b85efb2 to your computer and use it in GitHub Desktop.
Reset your graphics driver on Windows 10 using powershell. This has to be run as administrator - your screen will flicker a few times.
if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) {
Start-Process powershell.exe "-WindowStyle Minimized -NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`"" -Verb RunAs; exit
}
Get-PnpDevice -Class "Display" | Disable-PnpDevice -Confirm:$false
Get-PnpDevice -Class "Display" | Enable-PnpDevice -Confirm:$false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment