Remote access to the Plug and Play (PNP) RPC interface was removed in Windows 8, and since that time administrators have been unable to remotely manage Windows devices without RDP or a third party utility. I haven’t been a desktop support person in years, and only recently learned about this, when troubleshooting a workstation with a local admin. I wrote Manage-RemoteDevices.ps1 to fill this need in my organization. I am connecting to the computers with WSMAN when available, with a fallback to DCOM using a simplified version of simplified version of Mike Robbins’ New-MrCimSession. The script uses Out-Gridview to list the devices, and lets you toggle the enable/disable state for each. Deletions are managed locally by a remote execution of the pnputil.exe command using WSMAN only in this version.
Once this was written, I noticed that had the code to list connected USB devices. By using the ViewConnectedUSB switch, you get a list filtered for instanced IDs beginning with “US”. The syntax is easy: ./Manage-RemoteDevivces.ps1 -Computername MyPC or ./Manage-RemoteDevivces.ps1 -Computername MyPC -ViewConnectedUSB