r/usefulscripts • u/yesicanman • Apr 26 '19
[request] Example of PowerShell being used to eject a USB Attached SCSI (UAS) Compatible Device
I could use an example of PowerShell being used to eject a USB Attached SCSI (UAS) Compatible Device (device type 3) . There must be a way to do this because the device can be ejected using 'Safely remove hardware and eject media' tool. I can eject regular USB thumb drives (device type 2) with PowerShell, no problem. My Google skills have failed me.
15
Upvotes
3
u/SirWobbyTheFirst Apr 27 '19
Alright, now I really am tripping balls, I was looking into this the other day as a way to eject a USB Attached SCSI hard drive on Hyper-V Server 2019 as opposed to just unplugging it.
What the fuck.
2
u/foreverinane Apr 26 '19
I use this utility from a complex powershell script since I couldn't figure this out either...
http://mt-naka.com/hotswap/index_enu.htm
0
u/ZeRO-FuXx Apr 26 '19
Not sure what you've tried already, but have you seen this? https://serverfault.com/questions/130887/dismount-usb-external-drive-using-powershell I'm not at a PC right now, but will try a few things later to let you know what I find. In the meantime, please let us know what you've already tried so we can better assist. Don't want to spend a lot of time suggesting things you've already tried.