How to Allow USB Access Only During Working Hours: Step-by-Step Guide 2026
Allowing USB access only during working hours means a Windows PC accepts USB storage between set times, such as 08:00 and 18:00, and refuses it the rest of the day. This guide covers Windows 10 22H2, Windows 11 and Windows Server, for one PC or a small office. Windows has no clock setting for this, so the working method pairs a lock with a schedule.
Windows can block USB storage but cannot do it by time of day on its own. Run one script from three SYSTEM tasks, at opening, closing and startup, and let it set the Deny_All removable-storage value to 0 inside working hours and 1 outside them. Test with a spare drive before you rely on it.
| Applies to | Windows 10 22H2, Windows 11, Windows Server |
|---|---|
| Time needed | About 20 minutes per PC |
| Difficulty | Moderate: administrator rights and a short script |
| Cost | $0 with built-in tools |
| Needs admin or internet | Administrator yes, internet no |
| Last verified | November 2026 |
In this guide
- Quick answer and the lock, clock, list rule
- Why block USB ports at all
- Built-in Windows methods compared
- Step-by-step setup
- Free methods compared
- Shared, school and kiosk PCs
- Common mistakes
- How to verify it worked
- Troubleshooting
- Is this enough?
- Re-enabling USB ports
- Our recommendation
- Approved drives only
- Software step by step
- Software compared
- Logging and auditing
- How the lock works
- Cost
- Who should use which
- Related tools
- FAQ
- Short answers
- Our verdict
How to Allow USB Access Only During Working Hours: Quick Answer
To allow USB storage only during working hours on Windows, write one registry value, Deny_All, from three scheduled tasks. The opening task sets it to 0, the closing task sets it to 1, and a startup task applies whichever state the clock calls for. Windows itself has no timetable setting for removable storage.
That sentence hides a pattern worth naming, because every method in this guide fits it. We call it the lock, clock, list rule. The lock is the mechanism that stops storage. The clock is whatever flips the lock at the right minute. The list is the set of drives or people allowed through when the lock is closed. Windows ships a lock. Task Scheduler is a clock. Filter software supplies a list.
| Part | Question to answer | Typical answer on Windows |
|---|---|---|
| Lock | What stops storage? | Deny_All value, or USBSTOR Start set to 4 |
| Clock | What switches it? | Three tasks: open, close, startup |
| List | Who is allowed through? | Nobody, or an allow-list tool for approved drives |
Pick your path
Not everyone arrives with the same problem. Choose the intent that matches yours and the page jumps to the right section.
If the rule is already in place and failing, the full diagnosis is in the guide to a working-hours rule that does not switch. If you are still choosing a method, the side-by-side look at Group Policy, registry and software covers edition, scale and password needs.
Why Block USB Ports at All
USB storage is the easiest route for data to leave a PC unnoticed and for malware to arrive, because a drive the size of a thumbnail holds gigabytes and Windows mounts it without asking. Blocking it outside working hours removes the evenings, weekends and lunch breaks when nobody is watching the screen.
USB data theft and insider-risk basics
Most USB incidents are dull. A departing employee copies a customer list on the last Friday. A visitor plugs in a phone to charge it and the phone mounts as storage. A contractor with after-hours access moves a project folder to a personal drive. None of these needs skill, only a free port and an unobserved ten minutes.
A rule tied to working hours does not stop a determined insider during the day. It removes the quiet window, and it leaves a clear boundary that staff understand: drives work while the office is staffed.
How autorun malware spreads from USB drives
Current Windows versions do not run a program from a flash drive on their own, so infection usually needs a person to open a file or shortcut on the drive. That step still happens often enough to matter, which is why shared computers and reception desks are the usual first places to restrict. A blocked drive removes the step altogether.
Why a working-hours rule rather than an all-day ban
An all-day ban is simpler, but staff who genuinely use drives for presentations or backups work around it, and workarounds are harder to see than a rule with set hours. A time window gives people a legitimate slot and keeps the risky hours closed.
Risk scorecard: is your PC exposed through USB?
Tick every statement that is true. The band updates as you go.
Low exposure (0 of 5 risk factors checked).
Built-in Windows Methods Compared
Windows offers four built-in ways to stop USB storage: the Group Policy setting All Removable Storage classes: Deny all access, the Deny_All registry value that policy writes, the USBSTOR driver Start value, and Device Manager. None carries a time of day, so each needs Task Scheduler to become a working-hours rule.
| Method | Where you set it | Editions | What it blocks | Reverts by | Main limit |
|---|---|---|---|---|---|
| Group Policy | Computer Configuration, Administrative Templates, System, Removable Storage Access | Pro, Enterprise, Education | All removable storage classes, including portable devices | Setting it to Not Configured | No clock; Home has no editor |
| Registry Deny_All | HKLM\SOFTWARE\Policies\Microsoft\Windows\RemovableStorageDevices | Every edition | Same classes as the policy | Setting the value to 0 | Needs a test; some builds want a restart |
| USBSTOR Start | HKLM\SYSTEM\CurrentControlSet\Services\USBSTOR | Every edition | USB mass-storage driver only | Setting Start back to 3 | A drive already mounted can stay usable |
| Device Manager | Right-click a device, then Disable device | Every edition | One device instance | Enabling the device | Windows can re-detect the drive |
| Verdict | Registry Deny_All | Every edition | Broadest block with a simple switch | Value 0 | Best base for a schedule |
How USB port blocking differs from disabling a single device
Device Manager disables one device instance, such as the drive you plugged in today. The next drive installs normally. Class-level rules, which both the policy and the registry values use, act on every device of a type, so a new drive from a stranger is refused too. Neither approach switches off the physical port: a keyboard in the same port keeps working, and the port can still supply power. Hardware-level port disabling happens in firmware settings and has no timetable.
Windows edition note: Home versus Pro
Run winver or open Settings, System, About to check your edition. Microsoft’s own community answers confirm that the Local Group Policy Editor, gpedit.msc, is present on Pro, Enterprise and Education and absent on Home. Home users get the same result by writing the registry value directly. The full edition-by-scale decision is covered in a separate comparison of the three control styles.
USB device class cheat sheet: storage, keyboards, printers and phones
| Device class | Examples | USBSTOR Start 4 | Deny_All 1 | Note |
|---|---|---|---|---|
| Mass storage | Flash drive, USB hard disk, card reader | Blocked | Blocked | The main target of both switches |
| Keyboard and mouse | Wired keyboard, wireless receiver | Not affected | Not affected | Neither switch touches input devices |
| Printers | USB laser or inkjet printer | Not affected | Not affected | Printing is a separate device class |
| Portable devices | Phone in file-transfer mode, camera | Not covered by the driver | Covered by policy, results vary | Test your exact phone model |
| Optical drives | CD, DVD, Blu-ray | Not affected | Blocked | Policy covers CD and DVD classes |
Allow keyboard and mouse while blocking storage
Both switches in this guide leave keyboards and mice alone. N-able’s documentation for disabling USB drives says the same about its registry object. The one exception to check is a hub or dock that presents storage and input on the same cable; test the exact hardware before you roll it out.
Method picker: Group Policy, registry or software
Suggested route: Use the registry value Deny_All with three scheduled tasks. Home has no policy editor, so the registry route is the one to follow.
Step-by-Step: Allow USB Access Only During Working Hours
Create one PowerShell script that sets Deny_All from the current time, then run it from three SYSTEM tasks: at opening time, at closing time and at startup. The setup takes about 20 minutes, needs an administrator account and installs nothing. Test with a spare drive before you trust it.
What you need before you start
- An administrator account on Windows 10 22H2, Windows 11 or Windows Server.
- A spare USB drive with nothing important on it.
- Opening and closing times, and whether weekends stay closed.
- A rollback plan: the backup command below and the re-enable steps further down.
Only administrators can schedule tasks, whatever account the task runs as. Plan for the opposite failure too: an administrator can undo the rule in seconds. Export the Windows policy key first with reg export "HKLM\SOFTWARE\Policies\Microsoft\Windows" C:\policy-backup.reg. If the key does not exist yet, there is nothing to back up; note that in your change log.
Create the script folder
Open an elevated PowerShell window and create
C:\Program Files\UsbHours. Standard users cannot write to Program Files subfolders by default, which matters because SYSTEM will run whatever is inside. Check withicacls "C:\Program Files\UsbHours"and confirm Users have read and execute only.Save the script
Save the file below as
apply-usb-hours.ps1in that folder. It reads the PC clock, picks 0 or 1, and writes Deny_All. Edit the two numbers: 480 is 08:00 and 1080 is 18:00, counted in minutes from midnight.# apply-usb-hours.ps1 (open 08:00, close 18:00, weekdays only) $now = Get-Date $m = $now.Hour * 60 + $now.Minute $open = 480; $close = 1080 $weekend = $now.DayOfWeek -in 'Saturday','Sunday' $allowed = ($m -ge $open) -and ($m -lt $close) -and (-not $weekend) $value = if ($allowed) { 0 } else { 1 } $key = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\RemovableStorageDevices' if (-not (Test-Path $key)) { New-Item -Path $key -Force | Out-Null } Set-ItemProperty -Path $key -Name Deny_All -Type DWord -Value $valueCreate the three tasks
Paste these into an elevated Command Prompt. Microsoft’s schtasks documentation notes that /ru SYSTEM needs no password and that SYSTEM tasks are not visible to ordinary users. The -ExecutionPolicy Bypass flag applies to this one launch only.
schtasks /create /tn "USB Hours Open" /tr "powershell.exe -NoProfile -ExecutionPolicy Bypass -File \"C:\Program Files\UsbHours\apply-usb-hours.ps1\"" /sc daily /st 08:00 /ru SYSTEM /rl HIGHEST /f schtasks /create /tn "USB Hours Close" /tr "powershell.exe -NoProfile -ExecutionPolicy Bypass -File \"C:\Program Files\UsbHours\apply-usb-hours.ps1\"" /sc daily /st 18:00 /ru SYSTEM /rl HIGHEST /f schtasks /create /tn "USB Hours Startup" /tr "powershell.exe -NoProfile -ExecutionPolicy Bypass -File \"C:\Program Files\UsbHours\apply-usb-hours.ps1\"" /sc onstart /ru SYSTEM /rl HIGHEST /fRun the closing task by hand
Run
schtasks /run /tn "USB Hours Close". Then check the value with the first command in the verification block below. Outside working hours the value must read 0x1.reg query "HKLM\SOFTWARE\Policies\Microsoft\Windows\RemovableStorageDevices" /v Deny_All schtasks /query /tn "USB Hours Close" /v /fo listTest with a spare drive
Unplug every USB drive, run the closing task, then plug in the spare. It should not open. Run the opening task, unplug and replug the drive, and it should open normally. Detail on each check is in the verification section.
The script uses the PC’s local clock, so daylight saving changes are handled without edits. A PC with the wrong time zone opens and closes at the wrong hours, so confirm the zone in Settings, Time and language.
Office USB policy generator
Choose your hours and the script and commands below update. The defaults already show a working 08:00 to 18:00 rule.
# apply-usb-hours.ps1 (open 08:00, close 18:00, weekdays only)
$now = Get-Date
$m = $now.Hour * 60 + $now.Minute
$open = 480; $close = 1080
$weekend = $now.DayOfWeek -in 'Saturday','Sunday'
$allowed = ($m -ge $open) -and ($m -lt $close) -and (-not $weekend)
$value = if ($allowed) { 0 } else { 1 }
$key = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\RemovableStorageDevices'
if (-not (Test-Path $key)) { New-Item -Path $key -Force | Out-Null }
Set-ItemProperty -Path $key -Name Deny_All -Type DWord -Value $valueschtasks /create /tn "USB Hours Open" /tr "powershell.exe -NoProfile -ExecutionPolicy Bypass -File \"C:\Program Files\UsbHours\apply-usb-hours.ps1\"" /sc daily /st 08:00 /ru SYSTEM /rl HIGHEST /f
schtasks /create /tn "USB Hours Close" /tr "powershell.exe -NoProfile -ExecutionPolicy Bypass -File \"C:\Program Files\UsbHours\apply-usb-hours.ps1\"" /sc daily /st 18:00 /ru SYSTEM /rl HIGHEST /f
schtasks /create /tn "USB Hours Startup" /tr "powershell.exe -NoProfile -ExecutionPolicy Bypass -File \"C:\Program Files\UsbHours\apply-usb-hours.ps1\"" /sc onstart /ru SYSTEM /rl HIGHEST /fNative method: Group Policy for an all-day block
If you want a permanent block and have Windows Pro or above, open gpedit.msc and go to Computer Configuration, Administrative Templates, System, Removable Storage Access. Double-click All Removable Storage classes: Deny all access, choose Enabled and click OK. Microsoft’s Tech Community guidance adds that the setting may not apply until the next restart. Group Policy blocks around the clock, so combine it with tasks only if you flip the same registry value.
Policy rollout checklist for multi-PC offices
Pilot on one PC for a week, extend to one team, then the office, and review quarterly. The stages, owners and a written policy template are in the small-office rollout guide.
Best Free Methods to Allow USB Access Only During Working Hours
Three free routes reach the same result: the registry value Deny_All with scheduled tasks, the USBSTOR driver switch with scheduled tasks, and an Intune script on a recurring schedule. They differ in how much they block, how they fail, and how many PCs they suit.
| Route | Blocks | Needs | Fails when | Suits |
|---|---|---|---|---|
| Deny_All plus tasks | All removable storage classes | Admin, 20 minutes | A mounted drive keeps working, or the value is ignored on your build | One to ten PCs |
| USBSTOR plus tasks | Mass-storage driver only | Admin, 15 minutes | A phone or optical drive is in play | Plain flash-drive control |
| Intune scheduled script | Whatever the script sets | Intune enrolment | The device is offline at the schedule | Managed fleets |
| Group Policy alone | All removable storage classes | Pro or above | You need hours; it has none | All-day blocks |
| Verdict | Deny_All plus tasks | Admin, 20 minutes | Test per build | Default starting point |
Registry USBSTOR method explained
The USBSTOR service loads the driver that talks to USB mass-storage devices. Its Start value under HKLM\SYSTEM\CurrentControlSet\Services\USBSTOR is 3 by default, meaning Windows starts it when needed, and 4 disables it. Microsoft’s archived support article describes setting it to 4 so a storage device does not work when connected, and says to back up the registry first. The same article does not say whether a restart is required, so verify on a test PC.
reg add "HKLM\SYSTEM\CurrentControlSet\Services\USBSTOR" /v Start /t REG_DWORD /d 4 /f
:: to allow storage again
reg add "HKLM\SYSTEM\CurrentControlSet\Services\USBSTOR" /v Start /t REG_DWORD /d 3 /fGroup Policy deny settings explained
Under Removable Storage Access you will find class-by-class settings such as Removable Disks: Deny read access and Deny write access, plus the broad All Removable Storage classes: Deny all access. Microsoft’s guidance for the broad setting is to use it alone rather than combining it with the individual ones. Pick one style for each PC and note it, because stacking settings makes later changes confusing.
Group Policy, registry or software: the short answer
Use Group Policy when the block runs all day on Pro editions. Use registry values and tasks when hours matter or the PC runs Home. Use software when you need a password prompt or an approved-drive list. The long version, with a decision tree, sits in the three-way method comparison.
Start with Deny_All, because it reverses with a single value and does not change a driver service. Fall back to USBSTOR only if your test shows the policy value has no effect on your build.
Common Mistakes When You Allow USB Access Only During Working Hours
Seven mistakes cause nearly every failed working-hours rule: testing with an already mounted drive, skipping the startup task, leaving the script in a writable folder, running daily work as administrator, forgetting weekends, mixing policy and registry settings, and letting laptops sleep through the trigger.
Not that
Test with the drive already plugged in.
Create only an open task and a close task.
Keep the script in a shared folder.
Give every user local administrator rights.
Do this
Unplug every drive, change the state, then plug in the spare.
Add the startup task so a PC that was off still lands in the right state.
Store it under Program Files and check permissions with icacls.
Use standard accounts for daily work.
Setting Deny_All in Group Policy and also writing it from a script means whichever ran last wins, and nobody can say which. Pick the script as the only writer, and leave the policy setting Not Configured.
Laptops add a seventh issue. A closed lid means no trigger, and a task set to run only on AC power may skip battery use. Check the task’s Settings tab for the option to run as soon as possible after a missed start, which covers the common case of a laptop asleep at closing time.
How to Verify It Worked After You Allow USB Access Only During Working Hours
Verification takes five checks: the scheduled task reports a last result of 0, the Deny_All value reads 0x1 after closing time, a spare drive will not open, a keyboard and mouse still work, and the same results repeat after a restart. Tick them off as you go on the list below.
Verification checklist
0 of 7 completed
If a check fails, the first suspect is the state of the drive you used, not the rule. A drive mounted before the change can stay usable until it is removed, which several Windows administrators report and Microsoft’s own community guidance notes for installed devices. Always unplug, change state, then plug in.
Troubleshooting a Working-Hours USB Rule
Most failures trace to one of five causes: the task never ran, the script wrote the wrong value, the drive was already mounted, another policy overrides the value, or the account has administrator rights. The table maps each symptom to its cause and fix.
| Problem | Likely cause | Fix |
|---|---|---|
| Drive still opens after closing time | Drive mounted before the change | Unplug it, run the closing task, plug it in again |
| Value stays 0x0 at night | Task never ran or SYSTEM could not start PowerShell | Query the task, read Last Result, fix the path to the script |
| Task result is not 0 | Quote or path error in the /tr command | Re-create the task and run it by hand |
| Rule reverses by itself | A domain policy or management tool writes the same value | Find the other writer and leave one |
| Open state at 03:00 after a restart | No startup task | Add the USB Hours Startup task |
| Works for staff but not admins | Admins can undo it | Move daily work to standard accounts |
Troubleshooting checklist
0 of 5 completed
The full diagnosis, including the task-chain check and the sleep and restart cases, is in the working-hours rule troubleshooting guide.
Is This Enough? What Else to Do After You Allow USB Access Only During Working Hours
A scheduled storage block is a good start and an incomplete defence. It stops casual copying outside working hours, but an administrator can undo it, a phone can still tether, and data can leave by email, cloud sync or a network share. Treat it as one layer in a short list.
Add the layers that match your risk. Encrypt laptop drives so a stolen machine is not a leak. Keep daily accounts standard. Record which drives connect, using software that logs devices, or Windows event history if you manage it. And review the rule each quarter, because staff, hours and Windows builds change.
Hardware port covers and firmware-level port disabling are valid for kiosks, but they have no timetable and are overkill for an office that needs drives during the day.
How to Re-enable USB Ports Safely
To re-enable USB storage as the administrator, first disable the scheduled tasks so they cannot reverse your change, then set Deny_All to 0 or the USBSTOR Start value back to 3, reconnect the drive and test. Restart once if Windows still refuses the drive.
Note the current value before you change anything, so you can return to it. If the drive appears but will not open, the value is probably still 1. If it does not appear at all, the USBSTOR Start value is the likelier cause. The two diagnostic paths and the commands for each are in the administrator re-enable walkthrough.
How to recover access to a drive or PC you own
If a block locks you out of your own drive, you are the owner and the fix is administrative, not a workaround. Sign in with an administrator account, check recovery keys you saved earlier, find the licence email for any lock software, and contact the vendor’s support through its contact page. Do not look for a way around a lock on a device you do not own.
USB Block for the Approved-Drive and Password Layer
Of the options covered, we recommend USB Block when the question is who gets through, not when. Its product page documents an allow-list for your own drives, a password prompt for unauthorised devices and a log of what was connected. It does not document a timetable, so we pair it with the scheduled tasks above.
That split is honest and useful. The scheduled tasks provide the clock and a blanket lock. USB Block’s device allow-list and password prompt provide the list, so an approved drive can work during the day without everyone else’s drive working too. The product is for Windows PCs and installs with administrator rights; once installed it protects all users on the PC.
Two limits matter. The page states that USB Block is not antivirus, so keep a separate antivirus product. And the page names Windows 10, 8 and 7 plus Windows Server 2008 to 2019, but not Windows 11, so ask the developer before buying for Windows 11 PCs.


How to Allow Approved Drives Only
Allowing approved drives only means everything is blocked except devices you have listed, so one trusted drive keeps working while a stranger’s drive does not. Windows can do this on managed PCs through device installation rules, and USB Block does it with an authorised-devices list and a password.
The pattern is the list part of the lock, clock, list rule. The USB Block product page says you can whitelist your own USB drives, external drives and phones so they work without a prompt, and that other devices are blocked. It does not state a limit on the number of approved devices.

For a working-hours setup, keep the list short. Put in the drives that staff must use, such as the office backup drive, and let the clock handle the rest. Review the list when someone leaves.
Software-Based USB Blocking Step-by-Step
Setting up USB Block takes five steps: install it with an administrator account, choose the device types to block in the Control Center, add approved drives, set a password, and confirm in the log that a test drive was handled as expected. This is a tutorial for the product, not part of the clock.
Install with administrator rights
The product page says installation needs administrator rights, and that it then covers every user on the PC.
Choose what to block
In the Control Center you can switch protection on for USB devices, discs and floppy drives, network access and non-system drives.
Add approved drives
Plug in each drive you trust and add it to the authorised list.
Set the password
Anyone opening an unauthorised device must enter it.
Check the log
Plug in a test drive and confirm the Reports and Logs tab records it.

None of the five steps sets a time of day. If you need hours, keep the scheduled tasks from the step-by-step section running alongside the software.
USB Access Control Software Compared: Timetable and Allow-List Support
Of the tools compared here, only some document a timetable. The built-in tasks do it by design, GiliSoft USB Lock is listed with scheduled access controls, SysTools USB Blocker is described with a lock-and-unlock timetable, and USB Block documents an allow-list and password but no schedule.
| Option | Time-based schedule | Approved-device list | Password prompt | Cost as documented |
|---|---|---|---|---|
| Windows tasks plus Deny_All | Yes, through Task Scheduler | No | No | Free |
| USB Block | Not documented on the product page | Yes | Yes | $49.95 one-time on the store |
| GiliSoft USB Lock | Listed with scheduled access controls | Not checked | Not checked | Not checked |
| SysTools USB Blocker | Described with a lock-and-unlock timetable | Not checked | Not checked | Not checked |
| ThreatLocker Storage Control | Not stated | Yes: blocks by default, approves specific devices | Not stated | Not stated |
| Verdict | Tasks for hours | USB Block for the list | USB Block for the prompt | Mix to fit |
The scheduling claims for the two named competitors come from independent roundups, an AIMultiple review of free USB blocking software and an IT Pro Community list of USB port locking tools. Cost and the other columns were not verified for those tools, so check each vendor before choosing. A community question on Microsoft Q&A about password-protecting USB ports lists USB Block among tools people suggest for a password prompt. Two further references: a NinjaOne walkthrough of disabling USB drives and the USB Block 1.7.0 press release.
Logging and Auditing USB Device Activity
A schedule tells you what should happen, and a log tells you what did. USB Block records which devices were allowed and when, plus incorrect password attempts. For the scheduled tasks, Task Scheduler keeps its own history of each run and its result code.

Best for and not ideal for
- Best for: small offices that want a record of which drives were approved and when.
- Not ideal for: central reporting across many PCs. The product page mentions central management only in a testimonial and gives no detail.
How the USB Lock Works Under the Hood
When a USB drive is plugged in, Windows checks the policy value, then the driver start type, then whether a driver for that device is already installed, and finally any filter software. A drive passes only if every layer allows it, which is why one layer is rarely enough.
Windows remembers devices it has already set up. Microsoft’s Tech Community guidance says that once a device driver is installed, prevention is no longer available until the driver is removed. Unplug first, apply the rule, then reconnect.
Value 3 lets Windows start the USB storage driver when needed, and 4 disables it. Microsoft’s support article uses 4 to stop a storage device working when connected.
Deny_All under the HKLM policy key applies to the whole PC, not to one account, which is why the script writes there instead of under a user hive.
It adds the list: approved drives, a password prompt and a log, none of which the built-in switches have.
USB Block Cost and What the Product Page Leaves Out
USB Block is listed at $49.95 (USD) on the NewSoftwares store as of November 2026, and the table types it as a one-time purchase. The store page gives no licence terms, and the product page does not say whether a trial exists or how long it lasts, so ask before you rely on one.
| Item | What the official pages say |
|---|---|
| Price | $49.95 USD on the NewSoftwares store |
| Purchase type | One-time, per the store table |
| Trial length | Not stated on the product page |
| Licence terms | Not stated on the store page |
| Extra computers | The product page describes buying additional licences |
Is it worth it? If you only need hours-based blocking, the free route in this guide does it. The product earns its price where a password prompt and an approved-drive list matter. Get the full version →
Who Should Use Which Option
Match the method to the situation: a home user on Windows Home needs the registry route, a Pro office of fewer than ten PCs can use tasks or Group Policy, a larger fleet needs central policy, and anyone who wants a password prompt or an allow-list needs software.
| Reader | Recommended method | Does USB Block fit? | Honest alternative |
|---|---|---|---|
| Home user, one PC | Registry Deny_All with tasks | Only for the password prompt | Do nothing extra |
| Small office, 2 to 10 PCs | Tasks on each PC, one script | Yes, for approved drives | Group Policy for all-day blocks |
| Larger fleet | Domain Group Policy or Intune | Not documented for central rollout | Management platform |
| School or kiosk | Lock closed all day, standard accounts | Optional | Group Policy |
| Parent on a family PC | Standard child account plus the schedule | Optional password prompt | Windows family features |
Frequently Asked Questions About Working-Hours USB Rules
Filter the questions by topic.
How to allow usb access only during working hours?
Write the Deny_All removable-storage value from three scheduled tasks. One runs at opening time, one at closing time and one at startup, and a short script sets the value to 0 inside working hours and 1 outside them. Windows has no native timetable setting, so the schedule always comes from Task Scheduler or a tool that adds one.
Can I allow usb access only during working hours without paid software?
Yes. Task Scheduler, a PowerShell script and the Deny_All registry value are all built into Windows 10 and Windows 11, so the rule costs nothing. You give up a password prompt and an approved-drive list, which are the two things a dedicated tool adds. Neither is needed if you only want hours-based blocking.
What is the fastest way to allow usb access only during working hours?
Copy the script and the three schtasks commands from the step-by-step section, change the two times, and run them in an elevated Command Prompt. Setup takes about 20 minutes including a test with a spare drive. For a permanent all-day block on Pro editions, the Group Policy setting is quicker but carries no clock.
What mistakes should I avoid when I allow usb access only during working hours?
Avoid testing with a drive that is already mounted, skipping the startup task, storing the script where standard users can edit it, and giving daily accounts administrator rights. Each one lets the rule fail quietly. The mistakes section lists seven in total, with the check that catches each.
How do I check that it worked after I allow usb access only during working hours?
Run reg query on the Deny_All value after closing time and expect 0x1, then plug in a spare drive and confirm it will not open. Repeat after a restart and again after opening time, when the value should read 0x0 and the drive should work. The verification checklist walks through each check.
Can I block USB storage but keep my keyboard and mouse working?
Yes. Both the Deny_All value and the USBSTOR driver switch act on storage, not on keyboards or mice. N-able’s documentation for disabling USB drives states that mouse and keyboard devices are not affected. Confirm on one PC first, especially with unusual receivers or docks that present several device types at once.
Does blocking USB ports stop phone charging?
The storage rules in this guide target data access, not port power, so a phone should still charge. What changes is file transfer: a phone in file-transfer mode appears as a portable device, and results differ by model and policy. Test your own phone, because some units behave differently from the documented class rules.
Will USB blocking work on Windows Home?
The registry method works on Home because it writes a value directly. Home has no Local Group Policy Editor (gpedit.msc), so the policy-editor route is unavailable. Microsoft lists the editor for Pro, Enterprise and Education only. Run a spare-drive test on Home, since the policy key is the same one the editor writes.
How do I re-enable USB ports as the administrator?
Disable the scheduled tasks first, or the next trigger will reverse your change. Then set Deny_All to 0, or set the USBSTOR Start value back to 3, and reconnect the drive. If Windows still refuses it, restart once. The re-enable section gives the order and the checks for each method.
Can I allow only one approved USB drive?
Yes, but not with the clock-based tasks alone. Windows can do it through device installation restrictions on managed PCs, and filter software can do it through an allow-list of approved drives. The tasks in this guide treat all storage the same way, so an exception list needs one of those tools.
Does USB Block have a working-hours schedule?
The USB Block product page does not document one. It describes blocking, a password prompt, an allow-list for your own drives and a log of allowed devices. For a timetable, pair it with the scheduled tasks in this guide or choose a tool that states scheduling, as the comparison table shows.
Does USB Block work on Windows 11?
The product page lists Windows 10, 8 and 7 in 32-bit and 64-bit form, plus Windows Server 2008, 2012, 2016 and 2019. Windows 11 is not named there. Ask the developer through the contact page before buying for Windows 11 PCs, and test on one machine first.
What happens if the PC is asleep or off at closing time?
The closing task does not run, so the value from the opening task stays in force. The startup task fixes this the next time the PC boots, because the script reads the clock and sets the right state. A PC that sleeps through closing time stays open until it wakes and a trigger fires.
Can a standard user bypass the rule?
A standard user cannot edit tasks that run as SYSTEM or write to HKLM, so the rule holds against ordinary use. An administrator can disable the tasks or change the value in seconds. That is why daily work should happen on standard accounts, and why this is a policy aid, not a defence against a determined admin.
Short Answers to the Exact Questions People Type
These cover the phrasing people use when they search, with the answer first.
Can you allow USB access only during working hours?
Yes, on any Windows 10 or Windows 11 PC where you hold administrator rights, and also on Windows Server. Windows will not accept a time range in any single setting, so the working method has two parts: a lock that switches USB storage off and on, and a scheduler that flips it at the right minute.
Two limits are worth knowing before you start. First, the rule applies to a PC, not to a person, so a user who carries a drive to another computer is unaffected. Second, the clock is the PC’s own clock; a machine with a wrong time zone opens and closes at the wrong hours.
Where the answer becomes no is on shared kiosks with no administrator, on devices managed by someone else’s policy, and on any PC where users hold admin rights. In those cases a change in account setup comes first.
What is the easiest way to allow USB access only during working hours?
The easiest route is the registry value Deny_All plus three scheduled tasks, because everything is built into Windows and one script holds the whole rule. You edit two times in a copy of the script, paste three commands and test with a spare drive. No installer, restart or licence is needed.
Group Policy looks easier on paper, since the setting has a clear name, but it has no clock. You would end up writing the same scheduled tasks to change the policy state, with more places for a mistake. The registry value removes that extra layer.
Software with a built-in timetable is easier still, if it exists for your needs and budget. The comparison section lists what each tool documents, and for the product reviewed here the documentation does not mention a timetable.
Allow USB access only during working hours for free
The free route is the one described in the step-by-step section: PowerShell, schtasks and the Deny_All value. Windows 10, Windows 11 and Windows Server include all three, so the cost is your time, about twenty minutes for one PC.
Free has a ceiling. Once you manage more than ten or so PCs, copying scripts by hand becomes a risk of its own, and a domain policy or a management console starts to earn its cost. Intune can run a script on a recurring schedule for enrolled devices.
Free also means unsupported. If a Windows update changes how policy values are read, you find out by testing. Keep one spare drive and a calendar reminder to test after major Windows feature updates.
Allow USB access only during working hours in 2026
Windows 10 reached end of support on October 14, 2025, so a PC still on Windows 10 22H2 no longer receives security updates unless it is enrolled in Extended Security Updates, which Microsoft says run to October 12, 2027 for consumers. A USB rule does not replace patching.
The method itself has not changed: the registry values, the Task Scheduler commands and the policy path are the same on Windows 10 and Windows 11. What has changed is the case for moving old PCs, because a locked-down USB port on an unpatched system leaves the network, email and browser exposed.
If you are planning 2026 work, write the rule once, test it on a Windows 11 PC, and keep the same script for both versions.
Our Verdict on Working-Hours USB Control
For most readers the right setup is the built-in one: a Deny_All value switched by three scheduled tasks, run from standard accounts and tested with a spare drive. Add USB Block when you need a password prompt and an approved-drive list, since its documentation shows no timetable.
Windows gives you a reliable lock and no clock. The clock is twenty minutes of work and a script you can read in one sitting. The list is the part worth paying for, and only if you have drives that must work while everyone else’s do not.
Go deeper
This guide is published by the NewSoftwares.net team, which develops USB Block. It covers free and built-in options alongside our own, and says so where our product does not fit. To reach the developer, use the NewSoftwares.net contact page.