You can use batch which gives you a couple of options. You can edit the registry key to disable usb devices from being used
reg add HKLM\SYSTEM\CurrentControlSet\Services\UsbStor /v "Start" /t REG_DWORD /d "4" /f
To enable change value to 3.
Or you can deny access to the files Usbstor.pnf and Usbstor.inf
cacls %windir%\Inf\Usbstor.pnf /d user cacls %windir%\Inf\Usbstor.inf /d user
Where user is the user account that you want to deny access for.
To enable use
cacls %windir%\Inf\Usbstor.pnf /p user:R cacls %windir%\Inf\Usbstor.inf /p user:R
Fonte link
Ou você pode usar Usbdeview ou Microsoft Devcon.