Unfortunately this does not work on two different Windows 11 systems we tried.
The "Disable-PnpDevice" command (run as Administrator) returns:
Disable-PnpDevice : Generic failure
At line:1 char:1
+ Disable-PnpDevice -InstanceId $id -Confirm:$false
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (Win32_PnPEntity...2485\03E72485"):ROOT\cimv2\Win32_PnPEntity) [Disable-PnpDevice], CimException
+ FullyQualifiedErrorId : HRESULT 0x80041001,Disable-PnpDevice
After that (and also after disable using the manual GUI method with Device Manager run as Administrator) it looks as if the device would be disabled but it is not, it can still be used. So it is not virtually unplugged.
We noticed that this is also the case for other (non Luxonis) devices on the systems we tried.
Any ideas why this does not work and how we could make this work?