mirror of
https://github.com/VirtualDrivers/Virtual-Display-Driver.git
synced 2026-10-22 06:32:32 -05:00
11 lines
508 B
PostScript
11 lines
508 B
PostScript
$deviceId = 'IddSampleDriver Device HDR'
|
|
$device = Get-PnpDevice -class Display -FriendlyName $deviceId -ErrorAction SilentlyContinue
|
|
if ($device) {
|
|
switch ($device.Status) {
|
|
'OK' { Write-Host "Disabling device"; Disable-PnpDevice -class Display -FriendlyName $deviceId -Confirm:$false; break }
|
|
default { Write-Host "Enabling device"; Enable-PnpDevice -class Display -FriendlyName $deviceId -Confirm:$false }
|
|
}
|
|
}
|
|
else {
|
|
Write-Warning "Device Called '$deviceId' not found"
|
|
} |