Skip to content

[Help]: Get-PnpDevice -Status 'Disabled' #508

Description

@DavidGonzalezGaliana

Which OS?

Win11 Pro

Which release?

24H2

Driver Version

NVIDIA driver version: 616.56

Device Specifications

  • VDC/VDD version: 25.7.23 (latest as of writing)
  • OS: Windows 11 Pro 24H2, OS build 26100.9168
  • GPU: NVIDIA GeForce RTX 5070
  • NVIDIA driver version: 616.56 (Game Ready)

What issue are you experiencing or what do you need help with?

Every time VDC tries to enable the Virtual Display Driver, it fails with a PowerShell ParameterBindingValidationException because the script calls Get-PnpDevice -Class Display -Status 'Error','Disabled'. 'Disabled' has never been a valid value for the -Status parameter of Get-PnpDevice — the accepted ValidateSet is only OK, Error, Degraded, Unknown. A genuinely disabled device is reported as Status: Error with ConfigManagerErrorCode 22, not Status: Disabled.

Because the command throws immediately, VDC's "search for disabled devices" step always returns zero results, so the enable action fails even when the Virtual Display Driver device is already present and healthy (see the debug dump below — it shows Status: OK).

Steps to Reproduce

  1. Install/reinstall VDD via VDC 25.7.23.
  2. Click "Enable Virtual Display Driver" (or let VDC trigger it automatically after an install/reload).
  3. Observe the PowerShell error in the VDC log.

Actual log output

[ACTION] Enabling Virtual Display Driver...
[INFO] Searching for disabled Virtual Display Driver...
[ERROR] PowerShell error: Get-PnpDevice : Cannot validate argument on parameter 'Status'. The argument "Disabled" does not belong to the set "OK;ERROR;DEGRADED;UNKNOWN" specified by the ValidateSet attribute. Supply an argument that belongs to the set and then try the command again.
At line:15 char:77
+ ... edDevices = Get-PnpDevice -Class Display -Status 'Error','Disabled' |
+                                                      ~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [Get-PnpDevice], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationError,Get-PnpDevice

[DEBUG] PowerShell output:
------
All Display Devices
------
Device: Virtual Display Driver
ROOT\DISPLAY\0000
Status: OK
Device: NVIDIA GeForce RTX 5070
PCI\VEN_10DE&DEV_2F04...
Status: OK
-------------------------------
------
Disabled Display Devices
------
No disabled display devices found
------------------------------------
NOT_FOUND: No suitable disabled display device found to enable
[ERROR] No disabled display device found that could be enabled.
[INFO] Trying alternative approach to enable display device...
[ERROR] Alternative approach failed to enable the driver.
[ERROR] Failed to enable Virtual Display Driver.

Expected behavior

  • The "Enable Virtual Display Driver" action should correctly detect whether the device is actually disabled and enable it, or recognize it's already OK and simply report success/no-op instead of failing.

Troubleshooting steps taken

No response

Expected outcome

No response

Additional information

This reproduces reliably regardless of GPU vendor/model — it's a static bug in the script's parameter usage, not something specific to my RTX 5070. I hit this consistently across multiple clean reinstalls of VDC 25.7.23.

Contact Details

davidgonzalezgaliana@gmail.com

Metadata

Metadata

Labels

help wantedExtra attention is needed

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions