forked from shoober420/windows11-scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDisableIntegratedGPU.ps1
More file actions
23 lines (16 loc) · 810 Bytes
/
DisableIntegratedGPU.ps1
File metadata and controls
23 lines (16 loc) · 810 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Disable Integrated GPU
# foreach ($dev in (Get-PnpDevice -Class Display | Where-Object {$_.Name -like "*Intel*"})) {
# &"pnputil" /disable-device $dev.InstanceId;
# }
# foreach ($dev in (Get-CimInstance win32_VideoController | Where-Object {$_.AdapterDACType -like "Internal"})) {
# &"pnputil" /disable-device $dev.PNPDeviceID;
# }
# https://www.elevenforum.com/members/garlin.5387/
# https://www.elevenforum.com/t/pnputil-uninstall-integrated-gpu.33072/#post-559670
$Adapters = @(Get-CimInstance win32_VideoController | Where-Object {$_.AdapterDACType -notlike "Internal"})
if ($Adapters.Count -ge 1) {
foreach ($dev in (Get-CimInstance win32_VideoController | Where-Object {$_.AdapterDACType -like "Internal"})) {
&"pnputil" /disable-device $dev.PNPDeviceID
}
}
cmd /k 'pause'