Home / Guide / Approved drives only

How to Allow Approved USB Drives Only With Group Policy

Allowing only approved USB drives means blocking device installation broadly, then permitting named hardware IDs and the input classes you still need. The order Windows evaluates those rules decides whether the allow list works at all, so this guide starts with that order and then walks through the steps.

Editorial TeamLast verified: November 20268 min read

Part of our guide to how to disable USB ports using Group Policy.

Four flash drives with one approved drive marked with a check and an allow list card below
Quick answer

Enable layered order of evaluation, prevent installation of devices not described by other settings, allow the keyboard, mouse and human interface classes, then add the approved drive's hardware ID to the allowed device IDs. Insert the drive to test. The allow entry takes effect only while the device is connected.

At a glance
Applies toWindows 10 and 11 Pro, Enterprise, Education
Time needed20 to 30 minutes with a pilot PC
DifficultyIntermediate to advanced
CostFree with Group Policy; paid with software
NeedsAdministrator rights and the drive to approve
Last verifiedNovember 2026

Class First, ID Second, Proof Third

The class-first rule has three moves: allow the device classes you must keep, allow the approved drive by ID, and prove the result with a test insertion. Windows ranks instance ID above device ID, device ID above setup class, and setup class above the removable flag.

Flow: Prevent all USB classes then Allow input device classes then Allow one device ID then Verify with gpresultPreventall USBclassesAllow inputdevice classesAllow onedevice IDVerify withgpresultLayered order of evaluation for device installation policies, from instance ID at the top to the removable device flag at the bottomDevice instance IDHardware or compatible IDDevice setup classRemovable device flag1234
Why order matters

Before layered evaluation, every prevent policy beat every allow policy. With it enabled, a specific allow entry can beat a broader prevent entry, which is what makes an approved-drive list possible.

Find the Hardware ID of the Drive You Approve

Every USB device reports identifiers, and the Hardware Ids property in Device Manager shows them. A flash drive typically lists a USB entry with vendor and product codes plus a USBSTOR entry; the vendor and product pair identifies a model, and the serial number identifies one physical unit.

A USB hardware ID split into vendor ID, product ID and instance serial numberUSB\VID_0781&PID_5581\<serial>Vendor IDProduct IDInstance (serial)
  1. Insert the approved driveUse a PC where no policy blocks it yet.
  2. Open Device ManagerFind the drive under Disk drives and USB controllers.
  3. Read the IDsProperties, Details, then Hardware Ids. Copy the lines you will paste into policy.
Model versus unit

Allowing a vendor and product ID admits every drive of that model, including ones nobody approved. Use the instance ID when a drive has a real serial number, and expect some cheap drives to fall short.

Build the Allow List in Group Policy

The policy needs four settings under Computer Configuration, Administrative Templates, System, Device Installation, Device Installation Restrictions: layered evaluation, allowed setup classes, allowed device IDs, and the setting that prevents installation of anything not otherwise described. Pilot before linking widely.

  1. Turn on layered evaluationEnable Apply layered order of evaluation for Allow and Prevent device installation policies across all device match criteria.
  2. Allow input classesUnder Allow installation of devices using drivers that match these device setup classes, add the keyboard, mouse and HID class GUIDs.
  3. Allow the approved driveUnder Allow installation of devices that match any of these device IDs, add the hardware IDs you copied.
  4. Prevent everything elseEnable Prevent installation of devices not described by other policy settings, then run gpupdate /force.
Setup class GUIDs for the allowed classes list
Keyboard   {4d36e96b-e325-11ce-bfc1-08002be10318}
Mouse      {4d36e96f-e325-11ce-bfc1-08002be10318}
HID class  {745a17a0-74d3-11d0-b6fe-00a0c90f57da}

Microsoft's device-installation guide includes a worked scenario that blocks all USB devices while allowing one authorized thumb drive; read it beside this list. Already-installed devices are not removed by installation policy, so test with a freshly connected unapproved drive. Independent coverage of why this matters appears in a guide to detecting and preventing USB data leaks.

Prove the Allow List Works

Proof takes two insertions: the approved drive must mount, and an unapproved drive must be refused. Check gpresult for the four settings, and read the setupapi.dev.log file in the Windows inf folder, where blocked installs are recorded with the class GUID Windows rejected.

Allow-list proof checklist

An Allow List Without Reading Hardware IDs

If hardware IDs feel brittle, a program with a visible authorized list is simpler. USB Block keeps authorized devices in its own list inside the program, and you remove an entry by selecting it and choosing Remove from List. It manages one Windows PC at a time and is paid.

USB Block authorized devices tab with serial number, device type and device ID columns
The authorized devices tab in USB Block's device allow-list.

Windows installers are listed on the official NewSoftwares download hub.

Questions About Approved USB Drives

These six answers cover the allow-list questions administrators ask most: hardware IDs, model-wide matches, the connected-device rule, input classes and the software alternative. Each begins with the answer, then states the condition that changes it.

Yes. Block device installation broadly, then allow the approved drive by hardware ID or instance ID and enable layered order of evaluation. Test on a pilot PC first, because a flash drive often shows up as more than one device node, and each node may need its own allow entry.

Open Device Manager, right-click the device, choose Properties, then the Details tab, and pick Hardware Ids from the Property list. Copy the line starting with USB or USBSTOR. The setupapi.dev.log file in the Windows inf folder also records blocked devices.

Yes. Vendor and product IDs identify a model, so every drive of that model matches the entry. Only an instance ID, which includes the serial number, singles out one physical drive, and some inexpensive drives lack a truly unique serial number.

Not in the way people expect. Microsoft notes that the allow list takes precedence over the prevent list only while the listed devices are connected. Test by actually inserting the approved drive, because reading the policy text alone proves nothing about behavior.

Add the keyboard, mouse and human interface device setup classes to the allowed classes list before preventing everything else. Pilot on one PC and keep a second input device available, so a mistake never locks you out of the machine.

Yes, dedicated software. USB Block keeps an authorized devices list you manage inside the program, and you remove an entry by selecting it and pressing Remove from List. It is a paid, single-PC option that avoids reading hardware IDs entirely.

Next Step for Approved-Drive Setups

After the allow list passes testing, record the approved IDs in your change log and review them when drives are replaced. Where one PC needs a simpler list and a report, USB Block handles it without hardware IDs.