How to enable or disable USB ports in Windows

Last update: 11/06/2025
Author Isaac
  • Control the ports USB of your PC improves security and protects your data.
  • There are multiple methods to enable or block USB ports on Windows.
  • The record, the Device administrator and group policies are primary options.

USB ports in Windows

Nowadays, security and control over the devices we connect to our computers is an issue we must not overlook. USB ports are a real gateway for data and external devices.larvae, nymphs, and adults, so Knowing how to manage them can save us from more than one unpleasant surprise.. Whether you need to protect your confidential information, manage multiple user accounts on a shared computer, prevent data theft, or protect yourself from malware, Enabling or disabling USB ports in Windows is a simple and very useful measure..

In this article I explain in detail and step by step How to enable or block USB ports in Windows, the most common reasons for doing so, the different methods available—both from system options and with external tools—and we answer frequently asked questions so you have everything under control. In addition, I will show you How to troubleshoot common USB port problems and some additional recommendations to protect your PC against external threats.

Why block or enable USB ports in Windows?

The first step to understanding the importance of these procedures is to know the Reasons why you might want to disable or enable the USB ports on your Windows computerHere I list the most common ones:

  • Prevent data theft or leaksIn offices, educational institutions, or shared environments, a USB can be used to copy data without authorization.
  • Protect against malware and external threats: USB flash drives and hard drives are one of the most common infection vectors in Windows.
  • Manage devices on public or collective computers: Prevents unauthorized users from connecting devices storage and access or modify information.
  • Prevent misuse or accidental disconnection of important peripherals: You can disable only storage and keep the keyboard, mouse, or printers working.

In addition, there are times when due to company policy, exam requirements, laboratories or simple personal prevention, Full control is required over which devices can access information from our operating system.

Methods to enable or disable USB ports in Windows

regedit

There are several ways to lock or unlock USB ports on Windows computers. Each method offers certain advantages depending on the scenario, so I'll detail each one here:

  How to Create a Data Drive D: in Windows 11 Using a Secondary Hard Drive

1. Using the Windows Registry Editor

Registry Editor is one of the most direct and effective ways to manage the operation of the USB ports. You must have administrator permissions and follow the steps carefully, as incorrect changes could affect the system.

  1. Press Windows + R, type "regedit" and press Enter. The Registry Editor will open.
  2. Navigate to the route: HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ USBSTOR
  3. On the right side, locate the key Start.
  4. To disable USB ports, double-click on “Start” and change the value to 4.
  5. To re-enable the USB ports, repeat the process and change the value to 3.
  6. Restart the computer to apply the changes.

Setting the value to 4 blocks access to USB storage devices.If you need to use the ports again, simply reset them to their original values.

2. Disable USB ports from Device Manager

Windows allows manage and disable USB ports selectively from Device Manager, ideal if you only want to disable specific ports:

  1. Balance Windows + X and select “Device Manager”.
  2. Expand the section Universal Serial Bus (USB) Controllers.
  3. Right-click on the USB device (for example, "USB Root Hub" or "USB Host Controller"), and choose «Disable device» to block that port.
  4. To reactivate, select “Enable Device” from the same context menu.

This method allows you to more granular control, since you can block only certain ports and leave others working for necessary peripherals.

3. Via the Local Group Policy Editor (gpedit.msc)

Especially useful in Pro and Enterprise versions of Windows, allows you to apply restrictions globally or to the user thanks to group policies:

  1. Balance Windows + R and writes gpedit.msc.
  2. browse by Computer Configuration > Administrative Templates > System > Removable Storage Access.
  3. double click on "All removable storage classes: Deny access to all".
  4. Brand "Enabled" and save the changes. Now no one will be able to use USB storage devices.
  5. To revert, set the option to "Disabled" or "Not Configured" and click OK again.

This method is highly recommended for companies or educational centers to protect the entire local network from external threats or unauthorized access.

4. Local security directive

It can strengthen control with the local security directive (secpol.msc), where you can regulate access to removable devices:

  1. Open the start menu, type secpol.msc and run it.
  2. Accede to Local Policies > Security Options.
  3. Look for the option Device access control and set it to prevent the use of USB drives.
  How one can Obtain And Use WhatsApp on iPhone

It is a less used method, but also effective as an extra layer of security.

5. Uninstalling USB storage drivers

Another possibility to prevent the use of USB drives is uninstall the drivers responsible for USB mass storage:

  1. Enter in the Device administrator (Windows + X > Device Manager).
  2. Unfolds Universal series bus controllers.
  3. Right click on each "USB mass storage device" and click on “Uninstall device”.
  4. Once uninstalled, the USB drives will stop working until you reinstall the drivers.

This method is useful in public places or environments with many users, although sometimes Windows may reinstall the drivers automatically after a restart.

6. Changing permissions on system files

If you want to prevent anyone from installing new USB devices, You can restrict permissions on Inf and Pnf files that control the installation:

  1. Access the folder %SystemRoot%\Inf in the file explorer.
  2. Right click on the files usbstor.inf y usbstor.pnf. Select “Properties.”
  3. Go to the "Security" tab, add the user/group you want to deny access to and check the box. "Deny" next to “Total Control”.
  4. Do the same with the local system account.

This measure prevents new USB storage devices from being installed, although it does not block those who were already connected before.

7. Options from the BIOS/UEFI

Some models of computers and motherboards allow, from their own BIOS/UEFI setup menu, completely disable all or certain USB ports:

  1. Restart your computer and enter the BIOS/UEFI (usually by pressing Delete, F2, F10, or another key specified by the manufacturer).
  2. Look for the peripherals or USB ports configuration category.
  3. Disable USB ports that you consider necessary (they may appear as “USB Configuration”).
  4. Save and exit to apply changes.

This method is very robust, as it prevents the use of USB ports even before they Boot and operating system. Ideal for blocking booting from USB or protecting the computer at the level hardware.

8. Use of third-party software

If you prefer a more automated solution, there are Specialized tools and utilities to block and control USB ports in WindowsSome of the most popular are SysTools USB Blocker, USB Block, or even antivirus with external device protection. These allow you to:

  • Temporary lock or unlock with password.
  • Managing permissions for different users.
  • Activity and device access logs.
  How to create, mount, and repair volumes with PowerShell in Windows

This kind of software adds convenience and advanced options, being the best alternative for less experienced users or those who need to adapt permissions with a click.

Troubleshoot USB ports

windows 11 device manager

Sometimes, even if you haven't changed any settings, USB ports may suddenly stop workingBelow are several diagnostic and troubleshooting methods recommended by Microsoft and other experts:

Use Device Manager to detect hardware changes

  1. Click on Home and writes devmgmt.msc to open Device Manager.
  2. Click on your computer in the list.
  3. In the top menu, go to Action > Scan for hardware changes.
  4. Check if the USB device is working properly again.

If the problem persists, try the following steps.

Restart your computer

Sometimes, A simple reboot can restore the functionality of the USB ports, especially if the failure is due to a system or driver loading error.

Disable and re-enable USB controllers

  1. Open Device Manager.
  2. Unfolds Universal series bus controllers.
  3. Right click on each driver and select uninstall.
  4. Restart your PC. Windows will automatically reinstall the drivers when you turn it on.

Esto It usually solves problems with ports blocked by software conflicts or system interruptions..

Disable USB selective suspend

En portable or power-saving devices, the "selective suspend" feature may cause the USB port to stop responding. To disable it:

  1. Open the Registry Editor (regedit).
  2. Navigate to HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\USB.
  3. Create or edit the DWORD value DisableSelectiveSuspend and set it to 1.

This setting will prevent USB devices from going into sleep state, even if all USBs will consume a little more power.

If after these steps your USB ports still don't work, it could be a physical or hardware failure, in which case you should contact a specialized technical service.

uses of the USB port of an Android TV-2
Related article:
How to make the most of your Android TV's USB ports