Windows 10
A Microsoft operating system that runs on personal computers and tablets.
11,857 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
How to disable and enable usb device on command line?
Hi Mao Van,
You can disable and enable the device using the Disable-PnpDevice and Enable-PnpDevice cmdlets in PowerShell.
Get-PnpDevice -FriendlyName "Device Name*" | Disable-PnpDevice -Confirm:$false
Get-PnpDevice -FriendlyName "Device Name*" | Enable-PnpDevice -Confirm:$false
The device name can be found in the Device Manager, or you can run Get-PnpDevice and check the FriendlyName property.
Best Regards,
Ian Xue
If the Answer is helpful, please click "Accept Answer" and upvote it.