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.
- Press Windows key + R, type
gpedit.msc, and press Enter. See how to open the Group Policy Editor in Windows 10. - Go to Computer Configuration > Administrative Templates > System > Removable Storage Access.
- Double-click All Removable Storage classes: Deny all access.
- Select Enabled, then OK.

- 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.
- Press Windows logo key + R, type regedit, and select OK.
- Go to
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USBSTOR. - Double-click Start, change the value to 4, and select OK.
- 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
- Right-click Start and select Device Manager.
- Expand Universal Serial Bus controllers.
- Right-click the controller or USB Root Hub you want to turn off, and select Disable device. Select Yes.

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 /forceand 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.

Matt Jacobs has been working as an IT consultant for small businesses since receiving his Master’s degree in 2003. While he still does some consulting work, his primary focus now is on creating technology support content for SupportYourTech.com.
His work can be found on many websites and focuses on topics such as Microsoft Office, Apple devices, Android devices, Photoshop, and more.