mirror of
https://github.com/VirtualDrivers/Virtual-Display-Driver.git
synced 2026-10-21 22:22:27 -05:00
first Toogle-script
This commit is contained in:
1 parent
ce92f44f69
commit
321781bdb0
1 file changed
+11
@@ -0,0 +1,11 @@
|
||||
$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"
|
||||
}
|
||||
Reference in new issue
Block a user