powershell script to test if a USB is attached
Hi,
I have a shell script that works using Windows Subsystem for Linux (WSL) which does the following:
- determines if we have a USB device
- if not, and is used by someone else, disconnect the USB device
- connect the USB device
I now have a requirement to convert this to a powershell script where by it does the same thing and returns either success (we have the device) or fail (we don't have the device).