- Home
- How to Start Logging USB Activity on a Windows PC Going Forw
How to Start Logging USB Activity on a Windows PC Going Forward
Windows cannot rebuild USB plug-ins from days when logging was off. This page shows the switches to turn on today and a checklist to roll them out.
- Commands for wevtutil and auditpol
- Rollout checklist
- Works on Windows 10 and 11
The log-before-you-need-it rule
The log-before-you-need-it rule says to enable USB logging on every PC today, because Windows cannot reconstruct plug-ins from days when the log was off. Four switches cover the job.
| Switch | Command or place | Records | Default |
|---|---|---|---|
| DriverFrameworks-UserMode log | wevtutil sl ... /e:true | Event 2003 connect, 2100 and 2102 removal | Off |
| Plug and Play audit | auditpol subcategory Plug and Play Events | Security event 6416 | Off |
| Removable Storage audit | auditpol subcategory Removable Storage | File access on removable media | Off |
| Driver-install events | System log, event 20001 | First connection of a device | On |
Order matters less than coverage. Turn on the event log first, because it is the cheapest switch and the one most often missed. Add Plug and Play auditing next if you want events in the Security log, where a central collector can pick them up. Save removable-storage auditing for PCs that hold sensitive files, since it writes far more entries.
Newer Windows 10 and 11 builds may also need a registry value named HotPlugSecureOpen before removable-storage events are written. NXLog documents this, so confirm on your own build by testing with a harmless drive.
Build your commands
The generator only prints text. Review each line, then run it yourself on PCs you are allowed to change.
Roll it out on more than one PC
A rollout needs four decisions: which PCs, how big the logs may grow, where copies go, and who reads them. Without a reader the logs only fill up.
Software can add a log on top. USB Block records which device was allowed and when, and its Reports and Logs tab keeps the latest one hundred entries.

Its page lists Windows 10, 8, 7 and Windows Server, so test before you plan a Windows 11 rollout. For the wider picture of reading existing history, use the main guide.
Add an allow-list and a log to the PCs that need one.
Get USB Block →Questions about logging USB activity
How do I turn on USB event logging in Windows?
Open Event Viewer, go to Applications and Services Logs, Microsoft, Windows, DriverFrameworks-UserMode, right-click Operational and choose Enable Log. Or run wevtutil sl Microsoft-Windows-DriverFrameworks-UserMode/Operational /e:true in an elevated prompt. Plug in a test drive and look for event 2003.
Can I enable the log on a remote computer?
Yes, with the /r option of wevtutil, for example wevtutil sl channel /e:true /r:PCNAME, when you have administrator rights on that PC and remote event log management is allowed through its firewall. Test on one machine before you run the same command across a list of PCs.
What does event 6416 record?
It records that an external device was recognised by the system, and it needs the Plug and Play Events audit subcategory enabled, which is off by default. You can turn it on with auditpol. The event lands in the Security log, so it follows your Security log retention settings.
Will logging slow down the PC?
Not noticeably for plug-in events, which are rare compared with other log writes. File-level auditing of removable storage can generate many more events, so enable it only where you need it and size the Security log accordingly. Watch disk space on small drives after you enable it.
Is logging enough to stop data theft?
No. Logs record what happened and do not prevent it. They help you answer who plugged what in and when. To prevent copying you need a policy or a program that blocks removable storage, which is a separate decision with its own trade-offs.
How long should I keep USB logs?
Keep them as long as your own policy or the rules that apply to your organisation require, and at least long enough to cover how soon you would notice a problem. Raise the log size or export to a file regularly so the oldest events are not silently overwritten.
Does Windows Home support these logs?
Event Viewer and wevtutil exist on Windows Home. The Group Policy route for audit settings needs gpedit, which Home builds usually lack, but auditpol runs from an elevated command prompt. Check each command on your own edition before you plan a rollout.