How to Set Dev Drive as Trusted or Untrusted in Windows 11
- 3 steps
- Needs administrator rights
Setting a Dev Drive as trusted or untrusted in Windows 11 controls how Microsoft Defender Antivirus scans that volume. A Dev Drive is a storage volume built for coding projects. On currently supported Windows 11 versions (25H2 or 26H2), it can speed up your builds because Defender checks its files differently from files on a normal drive.
When a Dev Drive is trusted, Defender uses performance mode on it. Instead of blocking each file operation until the scan finishes, it scans in the background, so builds and package restores run faster. When the drive is untrusted, Defender goes back to full real-time protection. That is safer but slower for file-heavy work.
This tutorial shows you how to check the current status and switch between the two with a few terminal commands.
To set a Dev Drive as trusted or untrusted, open Windows Terminal as administrator and run the trust command for its drive letter. Trusted lets Microsoft Defender Antivirus scan the drive in the background, which speeds up builds. Untrusted restores full real-time scanning. Turn on the Dev Drive protection toggle in Windows Security first.
What is a Dev Drive?
A Dev Drive is a storage volume built on ReFS (Resilient File System, the file system Microsoft designed for resilience and large volumes). It is tuned for the many small file reads and writes that coding projects generate, such as source trees, package caches and build output. The trust setting decides how Defender treats the volume, and it is what you change in this tutorial.
Trust is set per volume. Changing one Dev Drive does not affect your other drives or any other Dev Drive on the machine.
Windows trusts a newly created Dev Drive by default. Windows Defender (the built-in security software) runs in performance mode on that volume. In this mode, Defender scans files in the background instead of holding up each read or write until the scan completes.
This balances protection with fast file access. It is the right choice for most developers working with their own code and well-known package sources. If you have never changed the setting, your Dev Drive is probably already trusted, and the status check later in this guide confirms it.
Marking a Dev Drive as untrusted gives you stricter protection. Defender applies full real-time protection to the volume, just as it does on a normal drive. The cost is some performance overhead, which you notice most during large builds or when restoring many packages.
Consider untrusted if you store code or downloads from sources you do not fully trust on the drive, or if your organization’s security policy requires full scanning everywhere.
How to Set a Dev Drive as Trusted or Untrusted
Checking and changing the trust status of a Dev Drive takes a few terminal commands. You need an elevated (administrator) Windows Terminal, the drive letter of your Dev Drive, and a currently supported version of Windows 11 (25H2 or 26H2). If the commands are not recognized, update Windows and try again.
The volume must be a real Dev Drive, meaning a ReFS volume created as a Dev Drive. A regular drive, even one formatted as ReFS, does not accept the trust commands.
Defender performance mode must also be enabled for trust to have any effect. That is the Dev Drive protection toggle in Windows Security. If it is off, marking a drive as trusted changes the label but not how Defender scans it.
Step 1Open Windows Terminal as Administrator
Open Windows Terminal as administrator. Without elevated permissions, the commands that change trust fail with an access error. Use the steps below, or right-click the Start button (or press Win+X) and choose Terminal (Admin).
- Click the Start button (the Windows icon on the taskbar). The Start menu opens.
- Type Terminal in the search box. Windows Terminal should appear at the top of the results.
- Right-click Windows Terminal and select Run as administrator. If the User Account Control prompt appears, click Yes. A terminal window opens, and “Administrator” shows in its title bar.
That’s it. You now have an elevated terminal, which is what every command in the rest of this guide needs.
Step 2Check Your Dev Drive’s Current Status
Before you change anything, find out whether the drive is currently trusted or untrusted. A query command in Windows Terminal shows this.
- Find the drive letter of your Dev Drive in File Explorer under This PC.
- In the elevated terminal, type
fsutil devdrv queryfollowed by a space, your drive letter and a colon, as in the original form fsutil devdrv query :, then press Enter. - Read the output. It states whether the volume is a Dev Drive and whether it is trusted or untrusted.
That’s it. You now know the current trust state of the drive, so you can decide whether to change it.
If the output says the volume is not a Dev Drive, check that you typed the right drive letter. The trust commands only work on Dev Drives.
You can also see Dev Drive details and the trust status without a terminal. Open Settings System Storage Advanced storage settings Disks & volumes and select the drive. Windows Security also lists the setting under Dev Drive protection.
fsutil devdrv query <drive letter>:- Replace the placeholder with the actual drive letter assigned to your Dev Drive. In this tutorial the Dev Drive is the W: drive, so targeting it means entering the following command:Command Prompt
fsutil devdrv trust W: - Run the query command again and check that the output now reports the drive as trusted. If it still shows untrusted, make sure the terminal is elevated, the drive letter is correct, and the Dev Drive protection toggle in Windows Security is on.
That’s it. The command marks the W: drive as trusted, and Defender now scans it in performance mode. No restart is needed.
Step 4Set the Dev Drive as Untrusted
If you want maximum security, set the Dev Drive to untrusted. This is also how you undo the trusted setting.
- Open Windows Terminal as administrator, as described above.
- Type fsutil devdrv untrust W: and press Enter. Replace W with your actual drive letter. This turns on standard real-time protection for the volume.
- Run the query command again to confirm that the drive now shows as untrusted.
That’s it. The drive is untrusted, and Defender applies full real-time protection to it, as it does on a normal drive.
fsutil devdrv untrust W:This command changes the W: drive designation to untrusted. Your files are not touched, and only the way Defender scans them changes. To go back, run the trust command from the previous section.
Expect file-heavy tasks, such as large builds and package restores, to run slower once the drive is untrusted. That is the cost of full scanning.
Summary
- Trusted Dev Drive: Windows Defender runs in performance mode, which is faster for builds and file-heavy work.
- Untrusted Dev Drive: Defender uses full real-time protection, which is more secure but slower.
- You can switch between trusted and untrusted at any time with short commands in an elevated Windows Terminal, and you can check the result with the query command.
Pick the setting that fits how you work. Trusted drives let Defender run in performance mode, which suits day-to-day coding on projects you control. Untrusted drives get strict real-time protection, which makes more sense when you handle code or files from sources you cannot vouch for, or when your security policy demands it.
Learn More
For more technical details, see the official Microsoft documentation on Trusted Dev Drives.
Have a question about this guide?
Answered by AI from this guide. Good questions may be added to this page — please don't include personal details.
Did this guide fix your problem?
About the Author
Richard
Tech Writer, IT Professional
Richard is a writer at Geek Rewind who turns complex IT tasks into clear, step-by-step guides. He draws on years of hands-on experience in system administration and enterprise IT operations, focusing on Windows, Linux and WordPress: the problems people actually run into, and the fixes that work. His server and WordPress guides come from systems he runs himself. Richard builds and maintains the platform behind Geek Rewind, from its Ubuntu servers and Nginx configuration to its custom WordPress plugins. Many new tutorials start with readers' questions, and he's always glad to answer them in the comments.
No comments yet — be the first to share your thoughts!