It seems there are a couple ways to disable and re-enable devices by commandline. Took a little bit to find the ones I recalled seeing. devcon.exe
and PnPUtil
are 2 options.
Note that both devcon and PnPUtil are windows utilities, not 3rd party applications that one needs to trust & give permisions to which not everyone will be comfitable with.
pnputil /disable-device
pnputil /enable-device
I believe devcon might not be installed by default. windows - Quick Method to install DevCon.exe? - Super User
devcon disable
devcon enable
Finding the ID of the device you want to control with devcon, batch file - Enabling/disabling a device in Windows 10 from command line - Stack Overflow