[
    {
        "role": "user",
        "content": "how%20do%20I%20set%20a%20drive%20exclusion%20in%20the%20microsoft%20virus%20checker%20in%20windows%2011"
    },
    {
        "role": "assistant",
        "content": "Here\u2019s how to set a drive exclusion (i.e. exclude a whole drive or folder on a drive) in Microsoft Defender Antivirus on Windows 11. Note: when you exclude a drive or folder, real-time scanning will **not** check those files, which could leave the device more vulnerable. Only do this if you trust the contents. ([support.microsoft.com](https://support.microsoft.com/en-us/windows/allow-an-app-to-access-controlled-folders-b5b6627a-b008-2ca2-7931-7e51e912b034?utm_source=openai))\n\n---\n\n### Steps via Windows Security (GUI)\n\n1. Press **Windows key + I** to open **Settings**.  \n   Or click the **Start menu** \u2192 search for **Windows Security** \u2192 launch it.\n\n2. In Windows Security, click **\u201cVirus & threat protection.\u201d** ([makeuseof.com](https://www.makeuseof.com/windows-11-security-exclusions/?utm_source=openai))\n\n3. Under **\u201cVirus & threat protection settings,\u201d** click **Manage settings.** ([makeuseof.com](https://www.makeuseof.com/windows-11-security-exclusions/?utm_source=openai))\n\n4. Scroll down to **\u201cExclusions\u201d** and click **\u201cAdd or remove exclusions.\u201d** ([makeuseof.com](https://www.makeuseof.com/windows-11-security-exclusions/?utm_source=openai))\n\n5. Click **\u201cAdd an exclusion.\u201d** You\u2019ll get options:\n   - File  \n   - Folder  \n   - File type  \n   - Process ([support.microsoft.com](https://support.microsoft.com/en-us/windows/allow-an-app-to-access-controlled-folders-b5b6627a-b008-2ca2-7931-7e51e912b034?utm_source=openai))\n\n6. To exclude an entire drive, choose **Folder**, then browse to the drive you want to exclude (e.g. **D:\\**). Select it and confirm. This excludes that drive from real-time scanning. ([learn.microsoft.com](https://learn.microsoft.com/en-us/defender-endpoint/configure-extension-file-exclusions-microsoft-defender-antivirus?utm_source=openai))\n\n---\n\n### Using PowerShell (for Drive or Folder Exclusion)\n\nYou can also set exclusions using PowerShell, which is helpful for scripting or if the GUI is unavailable.\n\n- Open PowerShell **as Administrator**.\n\n- To add an exclusion for a path (e.g. the D: drive), use:\n\n  ```powershell\n  Add-MpPreference -ExclusionPath \"D:\\\"\n  ```\n\n  This excludes everything under D:\\ from scanning. ([learn.microsoft.com](https://learn.microsoft.com/en-us/defender-endpoint/configure-extension-file-exclusions-microsoft-defender-antivirus?utm_source=openai))\n\n- You can check all current exclusions:\n\n  ```powershell\n  Get-MpPreference | Select-Object -ExpandProperty ExclusionPath\n  ```\n\n  This will show all drive/folder path exclusions. ([learn.microsoft.com](https://learn.microsoft.com/en-us/defender-endpoint/configure-extension-file-exclusions-microsoft-defender-antivirus?utm_source=openai))\n\n---\n\n### Important Notes & Limitations\n\n- Excluding a drive root (like `C:\\` or `D:\\`) is allowed, but Microsoft strongly recommends **not** to exclude system-critical folders such as `\\Windows`, `\\Windows\\System32`, `\\Windows\\System32\\Drivers`, or other OS-protected paths. Excluding those may cause unpredictable results. ([10zig.com](https://www.10zig.com/wp-content/uploads/2024/03/Discovering_Microsofts_UWF_on_10ZiG_Windows_10_IoT_LTSC_2021_Thin_Clients.pdf?utm_source=openai))\n\n- Exclusions apply to **real-time protection** and scheduled scans. But some Defender features (like advanced threat protection, attack surface reduction, etc.) may still check excluded items in certain situations. ([learn.microsoft.com](https://learn.microsoft.com/en-us/defender-endpoint/configure-extension-file-exclusions-microsoft-defender-antivirus?utm_source=openai))\n\n- If your PC is managed by an organization (e.g. via Group Policy, Intune, or similar), there may be policies that prevent you from adding exclusions or override local exclusions. You might need admin rights. ([learn.microsoft.com](https://learn.microsoft.com/en-us/defender-endpoint/configure-extension-file-exclusions-microsoft-defender-antivirus?utm_source=openai))\n\n- Having **Tamper Protection** on can block changes to some Defender settings. If you can\u2019t add exclusions, check tamper protection status. ([reddit.com](https://www.reddit.com/r/DefenderATP/comments/1b26v9i?utm_source=openai))\n\n---\n\nIf you tell me the specific drive letter or path you want to exclude (e.g. \u201cexclude D:\\Games\u201d) and whether you want this just for your user or system-wide, I can give you more targeted steps."
    }
]