How to turn off my usb device on command line?

Mao Van 0 Reputation points
2024-11-11T18:40:17.2166667+00:00

How to disable and enable usb device on command line?

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
11,857 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. S.Sengupta 20,641 Reputation points MVP
    2024-11-12T00:35:39.3966667+00:00
    0 comments No comments

  2. Ian Xue 38,551 Reputation points Microsoft Vendor
    2024-11-12T00:51:25.27+00:00

    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.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.