Skip to content
Follow
Windows

How to Exclude Files from Microsoft Defender on Windows 11

Richard
Written by
Richard
Oct 24, 2021 Updated Aug 13, 2026 2 min read
How to Exclude Files from Microsoft Defender on Windows 11
How to Exclude Files from Microsoft Defender on Windows 11

Excluding files from Microsoft Defender on Windows 11 stops the built-in antivirus from blocking safe programs and games by mistake. Microsoft Defender is the default security tool on your PC that scans your system for threats, but it sometimes flags trusted items incorrectly.

Adding a folder, file type, or active process to your exclusion list tells Defender to ignore that specific item completely. This trick keeps your computer protected while letting you run the tools and apps you want without interruptions.

⚡ Quick Answer

Exclude files from Microsoft Defender by opening Windows Security, navigating to Virus & threat protection, then Manage settings, and finally Add or remove exclusions. Click Add an exclusion and choose the type of item to exclude.

How to add exclusions in 🪟 Windows 11

Certain files or folders on your Windows 11 computer are ignored by Microsoft Defender once added to an exclusion list. Managing these exclusions happens directly inside the Windows Security app.

1. Click the Start button and type Windows Security. Open the app.

Windows Security app open on Windows 11
windows 11 windows security app open

2. Click Virus & threat protection. Then, click Manage settings.

Virus and threat protection settings in Windows Security
windows 11 windows security app virus and threat protection

3. Scroll down and click Add or remove exclusions.

Adding an exclusion in Windows Security on Windows 11
windows security add exclusion on windows 11

4. Click the Add an exclusion button and choose File, Folder, File type, or Process.

Add an exclusion option in Windows Security app
windows 11 security app add an exclusion

5. Select your item and confirm the change.

Exclusion settings for Microsoft Defender on Windows 11
add exclusion to microsoft defander

Comparison of Exclusion Methods

MethodBest ForDifficulty
Windows Security AppHome usersEasy
PowerShellAdvanced usersMedium
Intune/GPOIT AdministratorsHigh

Advanced Configuration and Enterprise Management

Enterprise environments require centralized control, allowing administrators to push Microsoft Defender exclusions across multiple computers using Configuration Manager or Intune. PowerShell also permits rapid modification of exclusion lists on individual machines or groups of files.

💻Code
Add-MpPreference -ExclusionPath "C:\Projects\Development"

Wildcards target entire groups of files when broader coverage is necessary. For instance, using C:\Projects\*\bin will exclude the 'bin' folder inside every subfolder of your projects directory.

Validation and Verification

Active Microsoft Defender exclusions appear in PowerShell by querying the current list of ignored paths. Manual scans executed through the MpCmdRun.exe utility confirm whether specific files remain skipped during system checks.

PowerShell
Get-MpPreference | Select-Object -ExpandProperty ExclusionPath

This command lists all paths currently ignored by Defender. The MpCmdRun.exe tool also performs manual scans and verifies that excluded files skip scanning during scheduled security checks.

Best Practices for Security

Exclusions introduce a security risk to the operating system. Apply them only when addressing verified performance issues or false positives. Avoid excluding entire drives like C:\ or broad system directories. File-specific exclusions provide better protection than folder-wide exemptions.

Summary

Configuring Microsoft Defender exclusions accelerates trusted applications, and Windows Security or PowerShell handles the setup process.

Was this guide helpful?

📬 Get new Windows tips in your inbox
One email when we publish something worth your time. No spam, unsubscribe anytime.
Tags: #Windows 11
Was this helpful?
Richard

About the Author

Richard

Tech Writer, IT Professional

Richard, a writer for Geek Rewind, is a tech enthusiast who loves breaking down complex IT topics into simple, easy-to-understand ideas. With years of hands-on experience in system administration and enterprise IT operations, he’s developed a knack for offering practical tips and solutions. Richard aims to make technology more accessible and actionable. He's deeply committed to the Geek Rewind community, always ready to answer questions and engage in discussions.

2971 articles → Twitter

📚 Related Tutorials

How to Check Microsoft Defender Updates in Windows 11
Windows How to Check Microsoft Defender Updates in Windows 11
How to Optimize Microsoft Defender CPU Usage in Windows 11
Windows How to Optimize Microsoft Defender CPU Usage in Windows 11
How to Enable or Disable Windows Security Notifications in Windows 11
Windows How to Enable or Disable Windows Security Notifications in Windows 11
How to Change PowerShell Execution Policies in Windows 11
Windows How to Change PowerShell Execution Policies in Windows 11

No comments yet — be the first to share your thoughts!

Leave a Comment

Your email address will not be published. Required fields are marked *