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.

Editorial TeamNovember 2026Last verified: November 2026
Quick answer

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.

At a glance
Applies toWindows 10 and 11, Pro or Home
Time neededAbout 10 minutes per PC
DifficultyMedium
CostFree
NeedsAdministrator rights, no internet
Last verifiedNovember 2026
USB hub with keyboard and mouse allowed and a flash drive blocked
Part of the guide

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.

How each method treats a keyboard and mouse
MethodEffect on input devicesEdition
Removable Storage Access policyLeaves keyboards and mice alonePro, Enterprise, Education
USBSTOR Start value 4Leaves keyboards and mice aloneAll editions
Deny_All registry valueLeaves keyboards and mice aloneAll editions
Device installation rules with default denyBlocks anything not allowed, so input classes must be listedPro and up, or Intune
Defender device controlKeyboards are outside its scope, which covers devices that create a driveDefender plan required
Why this matters

A keyboard that fails after a policy change is the most common reason an administrator abandons a USB rule. Testing input first avoids that.

Warning

Edit the registry only after exporting the key. A wrong value in a system key can stop Windows from starting normally.

Method 1

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.

  1. Open the editor

    Press Win + R, type gpedit.msc and press Enter.

  2. Go to the setting

    Open Computer Configuration, Administrative Templates, System, Removable Storage Access.

  3. Enable the deny rule

    Double-click "All Removable Storage classes: Deny all access", choose Enabled and select OK.

  4. Apply and test

    Restart or run gpupdate /force, then plug in a spare drive and a keyboard.

Method 2

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.

PowerShell (administrator): block and restore storage only
# 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 3

Because 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

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.

  1. Create the profile

    In the Intune admin center choose Devices, Manage devices, Configuration, Create, New policy, with Windows 10 and later and Settings catalog.

  2. Add the settings

    Under Administrative templates, System, Device installation, Device Installation Restrictions, add the three allow settings named in the table below.

  3. Allow the input classes

    Enable the setup class setting and paste the keyboard and mouse GUIDs. Enable the default-deny setting last.

Allowed setup class GUIDs for input devices (Microsoft examples)
{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}   ; HID
Allow list with keyboard, mouse and USB Bus allowed and everything else deniedKeyboard class allowedMouse class allowedUSB Bus class allowedEverything else denied by default
A deny-by-default rule needs every input class listed.
Warning

Microsoft notes the GUIDs are examples and might differ for your hardware, and some devices carry several GUIDs. Verify each against the setup log.

Fix and verify

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.

Five step flow from blocked device to setup log to allowing the class and retestingDevice blockedOpen setup logCopy the GUIDAllow the classRe-test
The log names the class that needs allowing.

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

Common question

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.

Editorial pick

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.