How to Disable USB Ports in Windows 10

To disable a USB port in Windows 10, open Device Manager, expand Universal Serial Bus controllers, right-click the USB controller or hub, and select Disable device. To block only USB drives and keep your keyboard and mouse working, use Group Policy instead.

Applies to: Windows 10. Group Policy needs Windows 10 Pro, Enterprise or Education. Checked against Microsoft Support on September 27, 2026.

Before you start

  • A USB keyboard or mouse stops working if its port is turned off. Keep a way to undo it, like a laptop’s built-in keyboard and touchpad.
  • You need to be signed in as an administrator.
  • To block USB drives on a work PC, ask your IT team. They may already control this.

Block only USB drives (Group Policy)

This stops USB flash drives and external drives from opening, while keyboards, mice and printers still work.

  1. Press Windows key + R, type gpedit.msc, and press Enter. See how to open the Group Policy Editor in Windows 10.
  2. Go to Computer Configuration > Administrative Templates > System > Removable Storage Access.
  3. Double-click All Removable Storage classes: Deny all access.
  4. Select Enabled, then OK.
Windows 10 Local Group Policy Editor with Removable Storage Access selected and All Removable Storage classes Deny all access highlighted
Under Removable Storage Access (1), open All Removable Storage classes: Deny all access (2).
  1. Restart the PC, or run gpupdate /force. See how to run gpupdate /force in Windows 10.

To undo it, set the same policy to Not Configured. This also blocks SD cards and CD or DVD drives.

Block USB drives on Windows 10 Home (registry)

Home doesn’t have Group Policy, but a registry value turns off USB storage while keyboards and mice keep working. Back up the registry first.

  1. Press Windows logo key + R, type regedit, and select OK.
  2. Go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USBSTOR.
  3. Double-click Start, change the value to 4, and select OK.
  4. Restart the PC.

To allow USB drives again, set Start back to 3 and restart. Windows then loads the USB storage driver again as normal.

Make USB drives read-only instead

If people may open files but not copy files onto USB drives, use Group Policy. In Removable Storage Access, open Removable Disks: Deny write access, select Enabled, and select OK.

Turn off a USB port in Device Manager

  1. Right-click Start and select Device Manager.
  2. Expand Universal Serial Bus controllers.
  3. Right-click the controller or USB Root Hub you want to turn off, and select Disable device. Select Yes.
Windows 10 Device Manager with Universal Serial Bus controllers expanded and Disable device selected on a USB Root Hub
Right-click a USB Root Hub (1) and select Disable device (2).

Each hub may control more than one port, and it’s hard to tell which is which. To undo it, right-click the same item and select Enable device.

If something goes wrong

  • Your keyboard or mouse stopped working: use the laptop’s own keyboard or touchpad, or a touch screen, to open Device Manager and select Enable device.
  • The policy doesn’t take effect: run gpupdate /force and restart. Check that the PC runs Pro, Enterprise or Education.
  • USB drives still open after the registry change: restart the PC, and check that the Start value is 4.

Frequently asked questions

How do I see what’s plugged into my USB ports?

See how to see connected USB devices in Windows 10.

How do I remove a USB drive safely?

See how to safely eject an external hard drive in Windows 10.

Can I do this on Windows 10 Home?

Home doesn’t include the Group Policy Editor. Use the registry steps above or Device Manager instead.

Can I turn off USB ports in the BIOS?

Some PCs let you turn off USB ports in their UEFI or BIOS settings. Look for a USB or I/O ports section, and check your PC maker’s manual. Be careful not to turn off the ports your keyboard uses.

Will phones still charge from a blocked port?

Usually, yes. Blocking USB storage or disabling a port in Windows stops data, but most ports still supply power. A phone may charge without showing up as a drive.

Does blocking USB storage affect printers and webcams?

No. The Group Policy and registry steps only block storage devices like flash drives and external drives. Keyboards, mice, printers, webcams and headsets keep working as usual.

Microsoft’s references are Open Device Manager and Safely remove hardware in Windows. More help is on our Windows Help & Guides page.

Related: how to check if a Thunderbolt port is working on Windows 10.

Get Our Free Newsletter

How-to guides and tech deals

You may opt out at any time.
Read our Privacy Policy