How to Block USB Storage but Keep Your Keyboard and Mouse Working
Blocking USB storage while keeping a keyboard and mouse working is straightforward with the right control: storage-focused rules refuse flash drives and external disks yet leave input devices alone. This page applies to Windows 10 and Windows 11 PCs and shows three methods, plus the setup log trick that finds a missing class.
Use a storage-focused control: the Removable Storage Access policy on Windows Pro, or the USBSTOR registry value on any edition. Both leave keyboards and mice alone. If you use device installation rules instead, add the keyboard and mouse class identifiers to the allow list first.
| Applies to | Windows 10 and 11, Pro or Home |
|---|---|
| Time needed | About 10 minutes per PC |
| Difficulty | Medium |
| Cost | Free |
| Needs | Administrator rights, no internet |
| Last verified | November 2026 |
Why storage-only blocks leave input devices alone
Windows loads a separate driver for each USB device class, so a rule aimed at the storage driver or the removable storage classes never touches the keyboard or mouse drivers. Trouble starts only when a rule denies everything by default and relies on an allow list.
This page is part of our guide to USB blocker software for business. The class-first rule keeps the work short: decide which classes to keep, decide which to block, then test each on one pilot PC before the rest of the office.
| Method | Effect on input devices | Edition |
|---|---|---|
| Removable Storage Access policy | Leaves keyboards and mice alone | Pro, Enterprise, Education |
| USBSTOR Start value 4 | Leaves keyboards and mice alone | All editions |
| Deny_All registry value | Leaves keyboards and mice alone | All editions |
| Device installation rules with default deny | Blocks anything not allowed, so input classes must be listed | Pro and up, or Intune |
| Defender device control | Keyboards are outside its scope, which covers devices that create a drive | Defender plan required |
A keyboard that fails after a policy change is the most common reason an administrator abandons a USB rule. Testing input first avoids that.
Edit the registry only after exporting the key. A wrong value in a system key can stop Windows from starting normally.
Method 1: Removable Storage Access policy
The Removable Storage Access policy denies removable storage in one setting and leaves input devices untouched. It needs Windows Pro, Enterprise or Education, an administrator account and a restart or sign-out. Microsoft's reference gives the exact path and registry value the policy writes.
Open the editor
Press Win + R, type gpedit.msc and press Enter.
Go to the setting
Open Computer Configuration, Administrative Templates, System, Removable Storage Access.
Enable the deny rule
Double-click "All Removable Storage classes: Deny all access", choose Enabled and select OK.
Apply and test
Restart or run gpupdate /force, then plug in a spare drive and a keyboard.
Method 2: USBSTOR registry value
The USBSTOR registry value stops the USB storage driver from loading and works on every Windows edition, Home included. Microsoft's support article sets the Start value to 4 for PCs where a storage device is already installed, and the default of 3 restores it.
# Block USB storage
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\USBSTOR" -Name Start -Value 4
# Restore USB storage
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\USBSTOR" -Name Start -Value 3Because the change targets the storage driver, other USB devices carry on working. The trade-off is that every local administrator can reverse it and nothing records the attempt.
Method 3: Device installation rules with keyboard and mouse GUIDs
Device installation rules block anything not on an allow list, which suits strict policies but means keyboard and mouse classes must be listed by GUID. Microsoft documents the steps in the Intune settings catalog, and the same three settings exist in Group Policy.
Create the profile
In the Intune admin center choose Devices, Manage devices, Configuration, Create, New policy, with Windows 10 and later and Settings catalog.
Add the settings
Under Administrative templates, System, Device installation, Device Installation Restrictions, add the three allow settings named in the table below.
Allow the input classes
Enable the setup class setting and paste the keyboard and mouse GUIDs. Enable the default-deny setting last.
{4d36e96b-e325-11ce-bfc1-08002be10318} ; Keyboard
{4d36e96f-e325-11ce-bfc1-08002be10318} ; Mouse
{36fc9e60-c465-11cf-8056-444553540000} ; USB Bus (hubs and host controllers)
{745a17a0-74d3-11d0-b6fe-00a0c90f57da} ; HIDMicrosoft notes the GUIDs are examples and might differ for your hardware, and some devices carry several GUIDs. Verify each against the setup log.
Keyboard stopped working after a policy: how to find the missing class
When a keyboard dies after a device installation rule, Windows writes the missing class to the setup log. Open setupapi.dev.log in the Windows inf folder, search for the restricted installation message, copy the GUID on the nearby class line, add it to the allowed classes and repeat.
A blocked device shows the message "The installation of this device is forbidden by system policy". The log path is %windir%\inf\setupapi.dev.log, the search phrase is "Restricted installation of devices not described by policy", and the line to copy begins "Class GUID of device changed to". Repeat the loop because some devices have more than one class.
0 of 4 completed
Questions about keeping input devices working
No. The policy targets removable storage classes, and keyboards use a different class and driver. Microsoft documents it for storage-type media only, so input devices keep working. Confirm on one PC anyway, because a second policy from another source could change the outcome.
A device installation rule with the default-deny setting blocks anything not on the allow list, including a keyboard whose class GUID is missing. Read the setup log, find the GUID it reports, add it to the allowed classes, and repeat until the keyboard installs.
Yes, in rules that deny by default. Microsoft documents the USB Bus class for hubs and host controllers, and blocking it would disable the ports behind them. Allow that class before testing anything else, and keep a second input method nearby during the pilot.
The registry methods work on Home. The Group Policy route does not, because Microsoft's removable storage policies list Pro, Enterprise and Education and the Local Group Policy Editor is absent on Home. Use the USBSTOR value or a dedicated blocker on Home PCs.
Reverse the method you used: set the policy to Not configured or change the registry value back. If the keyboard is the casualty, use the on-screen keyboard or a second administrator session. The guide to re-enabling blocked ports covers each method step by step.
When policy is too fiddly, a blocker is shorter
A dedicated blocker is the shortest route when a pilot shows policy is too fiddly. USB Block's official page describes blocks for storage, discs, network access and non-system drives, and keyboards are not on that list, but test input devices on a pilot PC before wider use.
Read the USB Block product page for the platform list and feature descriptions, then compare it with the policy routes in the guide to built-in Windows methods. For managed rollouts, see how MDM-based file and data leak controls fit.