Enable USB port through Powershell script

Henk van Ingen 0 Reputation points
2024-09-20T11:01:59.4966667+00:00

Enable USB port through Powershell script
Settings in Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USBSTOR detected

Windows for business | Windows Server | User experience | PowerShell
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Marcin Policht 68,145 Reputation points MVP Volunteer Moderator
    2024-09-20T11:32:25.3033333+00:00

    Use the following

    $usbStorRegPath = "HKLM:\SYSTEM\CurrentControlSet\Services\USBSTOR"
    # Set the Start value to 3 (which enables the USB ports)
    Set-ItemProperty -Path $usbStorRegPath -Name "Start" -Value 3
    

    If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.

    hth

    Marcin


Your answer

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