sodcalculator

10 Tech How-To

How to Disable USB Ports in Windows

Guide 10-56750 · Updated · Step by step

Disabling USB ports on a Windows PC can prevent unauthorized data transfers, stop malware from spreading via USB drives, or keep users from plugging in unapproved devices. This guide covers the built-in methods—Device Manager, Group Policy, and the Registry—that work on Windows 10 and 11, plus how to re-enable ports later. No third-party software is needed.

What You’ll Need

  • A Windows account with administrator privileges (required for all methods).
  • For the Group Policy method: Windows 10/11 Pro, Enterprise, or Education edition (Home edition lacks gpedit.msc).
  • For the Registry method: a backup of your registry (optional but recommended).

Step-by-Step

Method 1: Disable via Device Manager (Quickest, Reversible)

  1. Press Windows + X and select Device Manager.
  2. Expand Universal Serial Bus controllers.
  3. Right-click the first item that says USB Root Hub (there may be several) and choose Disable device.
  4. Click Yes if prompted to confirm.
  5. Repeat for every USB Root Hub and USB Host Controller listed. This disables all USB ports on the system.
  6. To re-enable, right-click the same entries and select Enable device.

Method 2: Disable via Group Policy (Blocks All USB Storage)

  1. Press Windows + R, type gpedit.msc, and press Enter.
  2. Navigate to Computer Configuration > Administrative Templates > System > Removable Storage Access.
  3. Double-click All Removable Storage classes: Deny all access.
  4. Select Enabled, then click OK.
  5. Restart the computer or run gpupdate /force in Command Prompt to apply the change.
  6. To undo, set the policy back to Not Configured and restart.

Method 3: Disable via Registry (Blocks All USB Storage)

  1. Press Windows + R, type regedit, and press Enter.
  2. Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USBSTOR.
  3. Double-click Start in the right pane.
  4. Change the Value data to 4 (this disables the USB storage driver). Click OK.
  5. Close Registry Editor and restart the computer.
  6. To re-enable, change the value back to 3 and restart.

Common Mistakes

  • Disabling the wrong device: In Device Manager, disabling a USB controller also disables the keyboard and mouse if they are USB. Make sure you have a PS/2 keyboard/mouse or a touchscreen to regain control.
  • Only disabling one root hub: Most PCs have multiple root hubs; missing one leaves some ports active.
  • Using Group Policy on Windows Home: gpedit.msc is not available on Home editions. Use Device Manager or the Registry instead.
  • Not restarting after Registry change: The USBSTOR driver change requires a reboot to take effect.
  • Forgetting that Bluetooth devices are not USB: These methods do not block Bluetooth peripherals; disable Bluetooth separately if needed.

Tips

  • Keep a wired PS/2 keyboard and mouse handy if you disable USB in Device Manager, so you can re-enable if needed.
  • For a more selective block, in Device Manager you can disable only specific USB ports by identifying them under “Universal Serial Bus controllers” (e.g., “USB Root Hub (USB 3.0)”).
  • Use Group Policy or Registry methods if you want to block USB storage but still allow USB keyboards, mice, and other non-storage devices.
  • Create a System Restore point before making Registry changes.
  • If you need to temporarily allow a specific USB drive, you can re-enable the storage driver, copy files, then disable again.

Troubleshooting

  • USB devices still work after disabling in Device Manager: Make sure you disabled every entry under “Universal Serial Bus controllers,” not just the first one. Also check if there are “USB Composite Device” entries—disable those too.
  • Cannot find USBSTOR in Registry: The key exists on all Windows versions, but it may be hidden if the driver is not loaded. Navigate to the exact path; if missing, create a new key named USBSTOR under Services and add a DWORD called Start with value 4.
  • Group Policy change does not apply: Run gpupdate /force in an elevated Command Prompt, then restart. If the policy still doesn’t take effect, ensure you are on a Pro/Enterprise edition.
  • Keyboard/mouse stop working after disabling USB: Plug in a PS/2 keyboard/mouse, or use Remote Desktop (if enabled) to re-enable the USB controllers in Device Manager.
  • USB ports are disabled but you need to use a USB drive urgently: Temporarily enable the USBSTOR driver (Registry method) or re-enable the root hubs, then disable again after use.
  • Windows re-enables USB devices automatically: Some systems re-install drivers on reboot. Check that the Device Manager entries are still disabled; if not, use the Group Policy or Registry method which persists.

Frequently Asked Questions

Will disabling USB ports affect my mouse and keyboard?

If they are USB, yes. The Device Manager method disables the entire controller, which includes all USB devices. The Group Policy and Registry methods only block storage devices, so keyboards and mice continue to work.

Can I disable only the front USB ports and keep the back ones?

Not with the built-in methods. They disable all ports on a controller. To selectively disable specific physical ports, you would need to disable them in BIOS/UEFI (if supported) or physically disconnect the internal headers.

Is there a way to disable USB ports for a specific user only?

Yes, with Group Policy you can apply the setting to a specific user or group by editing the policy under User Configuration instead of Computer Configuration, or by using a filtered GPO. The Registry method is system-wide.

Does disabling USB ports prevent malware from spreading via USB?

Yes, if you disable the USB storage driver (Registry/Group Policy), Windows will not mount USB drives, so malware cannot be transferred via them. However, other USB devices like keyboards could still be used for attacks (e.g., BadUSB), so for full protection you would need to disable all USB.

Can I still charge my phone via USB if ports are disabled?

Possibly. Disabling the driver in Device Manager may cut power to the port, but some laptops provide power even when the data lines are disabled. The Registry/Group Policy methods only block storage, so charging still works.

How do I re-enable USB ports after using the Registry method?

Open regedit, navigate to the same USBSTOR key, change Start back to 3, and restart. The USB storage driver will load again.

Related

General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.

More in this bed

The whole Tech How-To bed →