Easy-GPU-PV/VMScripts/VDDMonitor.ps1
2022-01-09 13:24:06 +01:00

20 lines
420 B
PowerShell

$Global:VDD
Function GetVDDState {
$Global:VDD = Get-PnpDevice | where {$_.friendlyname -like "Parsec Virtual Display Adapter"}
}
While (1 -gt 0) {
GetVDDSTate
If ($Global:VDD -eq $NULL){
Exit
}
Do {
Enable-PnpDevice -InstanceId $Global:VDD.InstanceId -Confirm:$false
Start-Sleep -s 5
GetVDDState
}
Until ($Global:VDD.Status -eq 'OK')
Start-Sleep -s 10
}