|
|
|
@ -12,7 +12,6 @@ ms.author: deniseb
|
|
|
|
|
ms.custom: nextgen
|
|
|
|
|
ms.reviewer:
|
|
|
|
|
manager: dansimp
|
|
|
|
|
ms.date: 10/21/2020
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
# Configure and validate exclusions based on file extension and folder location
|
|
|
|
@ -29,40 +28,37 @@ ms.date: 10/21/2020
|
|
|
|
|
|
|
|
|
|
## Exclusion lists
|
|
|
|
|
|
|
|
|
|
You can exclude certain files from Microsoft Defender Antivirus scans by modifying exclusion lists. **Generally, you shouldn't need to apply exclusions**. Microsoft Defender Antivirus includes a number of automatic exclusions based on known operating system behaviors and typical management files, such as those used in enterprise management, database management, and other enterprise scenarios and situations.
|
|
|
|
|
You can exclude certain files from Microsoft Defender Antivirus scans by modifying exclusion lists. **Generally, you shouldn't need to apply exclusions**. Microsoft Defender Antivirus includes many automatic exclusions based on known operating system behaviors and typical management files, such as those used in enterprise management, database management, and other enterprise scenarios and situations.
|
|
|
|
|
|
|
|
|
|
> [!NOTE]
|
|
|
|
|
> Automatic exclusions apply only to Windows Server 2016 and above. These exclusions are not visible in the Windows Security app and in PowerShell.
|
|
|
|
|
|
|
|
|
|
This article describes how to configure exclusion lists for the files and folders. See [Recommendations for defining exclusions](configure-exclusions-microsoft-defender-antivirus.md#recommendations-for-defining-exclusions) before defining your exclusion lists.
|
|
|
|
|
|
|
|
|
|
Exclusion | Examples | Exclusion list
|
|
|
|
|
---|---|---
|
|
|
|
|
Any file with a specific extension | All files with the specified extension, anywhere on the machine.<br/>Valid syntax: `.test` and `test` | Extension exclusions
|
|
|
|
|
Any file under a specific folder | All files under the `c:\test\sample` folder | File and folder exclusions
|
|
|
|
|
A specific file in a specific folder | The file `c:\sample\sample.test` only | File and folder exclusions
|
|
|
|
|
A specific process | The executable file `c:\test\process.exe` | File and folder exclusions
|
|
|
|
|
| Exclusion | Examples | Exclusion list |
|
|
|
|
|
|:---|:---|:---|
|
|
|
|
|
|Any file with a specific extension | All files with the specified extension, anywhere on the machine.<br/>Valid syntax: `.test` and `test` | Extension exclusions |
|
|
|
|
|
|Any file under a specific folder | All files under the `c:\test\sample` folder | File and folder exclusions |
|
|
|
|
|
| A specific file in a specific folder | The file `c:\sample\sample.test` only | File and folder exclusions |
|
|
|
|
|
| A specific process | The executable file `c:\test\process.exe` | File and folder exclusions |
|
|
|
|
|
|
|
|
|
|
Exclusion lists have the following characteristics:
|
|
|
|
|
|
|
|
|
|
- Folder exclusions apply to all files and folders under that folder, unless the subfolder is a reparse point. Reparse point subfolders must be excluded separately.
|
|
|
|
|
- File extensions apply to any file name with the defined extension if a path or folder is not defined.
|
|
|
|
|
|
|
|
|
|
>[!IMPORTANT]
|
|
|
|
|
>Using wildcards such as the asterisk (\*) will alter how the exclusion rules are interpreted. See the [Use wildcards in the file name and folder path or extension exclusion lists](#use-wildcards-in-the-file-name-and-folder-path-or-extension-exclusion-lists) section for important information about how wildcards work.
|
|
|
|
|
>
|
|
|
|
|
>You cannot exclude mapped network drives. You must specify the actual network path.
|
|
|
|
|
>
|
|
|
|
|
>Folders that are reparse points that are created after the Microsoft Defender Antivirus service starts and that have been added to the exclusion list will not be included. You must restart the service (by restarting Windows) for new reparse points to be recognized as a valid exclusion target.
|
|
|
|
|
> [!IMPORTANT]
|
|
|
|
|
> - Using wildcards such as the asterisk (\*) will alter how the exclusion rules are interpreted. See the [Use wildcards in the file name and folder path or extension exclusion lists](#use-wildcards-in-the-file-name-and-folder-path-or-extension-exclusion-lists) section for important information about how wildcards work.
|
|
|
|
|
> - You cannot exclude mapped network drives. You must specify the actual network path.
|
|
|
|
|
> - Folders that are reparse points that are created after the Microsoft Defender Antivirus service starts and that have been added to the exclusion list will not be included. You must restart the service (by restarting Windows) for new reparse points to be recognized as a valid exclusion target.
|
|
|
|
|
|
|
|
|
|
To exclude files opened by a specific process, see [Configure and validate exclusions for files opened by processes](configure-process-opened-file-exclusions-microsoft-defender-antivirus.md).
|
|
|
|
|
|
|
|
|
|
The exclusions apply to [scheduled scans](scheduled-catch-up-scans-microsoft-defender-antivirus.md), [on-demand scans](run-scan-microsoft-defender-antivirus.md), and [real-time protection](configure-real-time-protection-microsoft-defender-antivirus.md).
|
|
|
|
|
|
|
|
|
|
>[!IMPORTANT]
|
|
|
|
|
>Exclusion list changes made with Group Policy **will show** in the lists in the [Windows Security app](microsoft-defender-security-center-antivirus.md#exclusions).
|
|
|
|
|
>
|
|
|
|
|
>Changes made in the Windows Security app **will not show** in the Group Policy lists.
|
|
|
|
|
> [!IMPORTANT]
|
|
|
|
|
> Exclusion list changes made with Group Policy **will show** in the lists in the [Windows Security app](microsoft-defender-security-center-antivirus.md#exclusions).
|
|
|
|
|
> Changes made in the Windows Security app **will not show** in the Group Policy lists.
|
|
|
|
|
|
|
|
|
|
By default, local changes made to the lists (by users with administrator privileges, including changes made with PowerShell and WMI) will be merged with the lists as defined (and deployed) by Group Policy, Configuration Manager, or Intune. The Group Policy lists take precedence when there are conflicts.
|
|
|
|
|
|
|
|
|
@ -85,32 +81,30 @@ See [How to create and deploy antimalware policies: Exclusion settings](https://
|
|
|
|
|
>[!NOTE]
|
|
|
|
|
>If you specify a fully qualified path to a file, then only that file is excluded. If a folder is defined in the exclusion, then all files and subdirectories under that folder are excluded.
|
|
|
|
|
|
|
|
|
|
1. On your Group Policy management computer, open the [Group Policy Management Console](https://technet.microsoft.com/library/cc731212.aspx), right-click the Group Policy Object you want to configure and click **Edit**.
|
|
|
|
|
1. On your Group Policy management computer, open the [Group Policy Management Console](https://docs.microsoft.com/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/cc731212(v=ws.11)), right-click the Group Policy Object you want to configure and click **Edit**.
|
|
|
|
|
|
|
|
|
|
2. In the **Group Policy Management Editor** go to **Computer configuration** and click **Administrative templates**.
|
|
|
|
|
2. In the **Group Policy Management Editor** go to **Computer configuration** and select **Administrative templates**.
|
|
|
|
|
|
|
|
|
|
3. Expand the tree to **Windows components > Microsoft Defender Antivirus > Exclusions**.
|
|
|
|
|
3. Expand the tree to **Windows components** > **Microsoft Defender Antivirus** > **Exclusions**.
|
|
|
|
|
|
|
|
|
|
4. Double-click the **Path Exclusions** setting and add the exclusions.
|
|
|
|
|
4. Open the **Path Exclusions** setting for editing, and add your exclusions.
|
|
|
|
|
|
|
|
|
|
- Set the option to **Enabled**.
|
|
|
|
|
- Under the **Options** section, click **Show...**.
|
|
|
|
|
- Specify each folder on its own line under the **Value name** column.
|
|
|
|
|
- If you are specifying a file, ensure you enter a fully qualified path to the file, including the drive letter, folder path, filename, and extension. Enter **0** in the **Value** column.
|
|
|
|
|
|
|
|
|
|
5. Click **OK**.
|
|
|
|
|
5. Choose **OK**.
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
6. Double-click the **Extension Exclusions** setting and add the exclusions.
|
|
|
|
|
6. Open the **Extension Exclusions** setting for editing and add your exclusions.
|
|
|
|
|
|
|
|
|
|
- Set the option to **Enabled**.
|
|
|
|
|
- Under the **Options** section, click **Show...**.
|
|
|
|
|
- Under the **Options** section, select **Show...**.
|
|
|
|
|
- Enter each file extension on its own line under the **Value name** column. Enter **0** in the **Value** column.
|
|
|
|
|
|
|
|
|
|
7. Click **OK**.
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
7. Choose **OK**.
|
|
|
|
|
|
|
|
|
|
<a id="ps"></a>
|
|
|
|
|
|
|
|
|
@ -126,21 +120,21 @@ The format for the cmdlets is as follows:
|
|
|
|
|
|
|
|
|
|
The following are allowed as the `<cmdlet>`:
|
|
|
|
|
|
|
|
|
|
Configuration action | PowerShell cmdlet
|
|
|
|
|
---|---
|
|
|
|
|
Create or overwrite the list | `Set-MpPreference`
|
|
|
|
|
Add to the list | `Add-MpPreference`
|
|
|
|
|
Remove item from the list | `Remove-MpPreference`
|
|
|
|
|
| Configuration action | PowerShell cmdlet |
|
|
|
|
|
|:---|:---|
|
|
|
|
|
|Create or overwrite the list | `Set-MpPreference` |
|
|
|
|
|
|Add to the list | `Add-MpPreference` |
|
|
|
|
|
|Remove item from the list | `Remove-MpPreference` |
|
|
|
|
|
|
|
|
|
|
The following are allowed as the `<exclusion list>`:
|
|
|
|
|
|
|
|
|
|
Exclusion type | PowerShell parameter
|
|
|
|
|
---|---
|
|
|
|
|
All files with a specified file extension | `-ExclusionExtension`
|
|
|
|
|
All files under a folder (including files in subdirectories), or a specific file | `-ExclusionPath`
|
|
|
|
|
| Exclusion type | PowerShell parameter |
|
|
|
|
|
|:---|:---|
|
|
|
|
|
| All files with a specified file extension | `-ExclusionExtension` |
|
|
|
|
|
| All files under a folder (including files in subdirectories), or a specific file | `-ExclusionPath` |
|
|
|
|
|
|
|
|
|
|
>[!IMPORTANT]
|
|
|
|
|
>If you have created a list, either with `Set-MpPreference` or `Add-MpPreference`, using the `Set-MpPreference` cmdlet again will overwrite the existing list.
|
|
|
|
|
> [!IMPORTANT]
|
|
|
|
|
> If you have created a list, either with `Set-MpPreference` or `Add-MpPreference`, using the `Set-MpPreference` cmdlet again will overwrite the existing list.
|
|
|
|
|
|
|
|
|
|
For example, the following code snippet would cause Microsoft Defender AV scans to exclude any file with the `.test` file extension:
|
|
|
|
|
|
|
|
|
@ -175,29 +169,26 @@ See [Add exclusions in the Windows Security app](microsoft-defender-security-cen
|
|
|
|
|
|
|
|
|
|
You can use the asterisk `*`, question mark `?`, or environment variables (such as `%ALLUSERSPROFILE%`) as wildcards when defining items in the file name or folder path exclusion list. The way in which these wildcards are interpreted differs from their usual usage in other apps and languages. Make sure to read this section to understand their specific limitations.
|
|
|
|
|
|
|
|
|
|
>[!IMPORTANT]
|
|
|
|
|
>There are key limitations and usage scenarios for these wildcards:
|
|
|
|
|
>
|
|
|
|
|
>- Environment variable usage is limited to machine variables and those applicable to processes running as an NT AUTHORITY\SYSTEM account.
|
|
|
|
|
>- You cannot use a wildcard in place of a drive letter.
|
|
|
|
|
>- An asterisk `*` in a folder exclusion stands in place for a single folder. Use multiple instances of `\*\` to indicate multiple nested folders with unspecified names.
|
|
|
|
|
> [!IMPORTANT]
|
|
|
|
|
> There are key limitations and usage scenarios for these wildcards:
|
|
|
|
|
> - Environment variable usage is limited to machine variables and those applicable to processes running as an NT AUTHORITY\SYSTEM account.
|
|
|
|
|
> - You cannot use a wildcard in place of a drive letter.
|
|
|
|
|
> - An asterisk `*` in a folder exclusion stands in place for a single folder. Use multiple instances of `\*\` to indicate multiple nested folders with unspecified names.
|
|
|
|
|
|
|
|
|
|
The following table describes how the wildcards can be used and provides some examples.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|Wildcard |Examples |
|
|
|
|
|
|---------|---------|
|
|
|
|
|
|:---------|:---------|
|
|
|
|
|
|`*` (asterisk) <br/><br/>In **file name and file extension inclusions**, the asterisk replaces any number of characters, and only applies to files in the last folder defined in the argument. <br/><br/>In **folder exclusions**, the asterisk replaces a single folder. Use multiple `*` with folder slashes `\` to indicate multiple nested folders. After matching the number of wild carded and named folders, all subfolders are also included. | `C:\MyData\*.txt` would include `C:\MyData\notes.txt`<br/><br/>`C:\somepath\*\Data` would include any file in `C:\somepath\Archives\Data and its subfolders` and `C:\somepath\Authorized\Data and its subfolders` <br/><br/>`C:\Serv\*\*\Backup` would include any file in `C:\Serv\Primary\Denied\Backup and its subfolders` and `C:\Serv\Secondary\Allowed\Backup and its subfolders` |
|
|
|
|
|
|`?` (question mark) <br/><br/>In **file name and file extension inclusions**, the question mark replaces a single character, and only applies to files in the last folder defined in the argument. <br/><br/>In **folder exclusions**, the question mark replaces a single character in a folder name. After matching the number of wild carded and named folders, all subfolders are also included. |`C:\MyData\my?` would include `C:\MyData\my1.zip` <br/><br/>`C:\somepath\?\Data` would include any file in `C:\somepath\P\Data` and its subfolders <br/><br/>`C:\somepath\test0?\Data` would include any file in `C:\somepath\test01\Data` and its subfolders |
|
|
|
|
|
|Environment variables <br/><br/>The defined variable is populated as a path when the exclusion is evaluated. |`%ALLUSERSPROFILE%\CustomLogFiles` would include `C:\ProgramData\CustomLogFiles\Folder1\file1.txt` |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>[!IMPORTANT]
|
|
|
|
|
>If you mix a file exclusion argument with a folder exclusion argument, the rules will stop at the file argument match in the matched folder, and will not look for file matches in any subfolders.
|
|
|
|
|
>
|
|
|
|
|
>For example, you can exclude all files that start with "date" in the folders `c:\data\final\marked` and `c:\data\review\marked` by using the rule argument `c:\data\*\marked\date*`.
|
|
|
|
|
>
|
|
|
|
|
>This argument, however, will not match any files in subfolders under `c:\data\final\marked` or `c:\data\review\marked`.
|
|
|
|
|
> [!IMPORTANT]
|
|
|
|
|
> If you mix a file exclusion argument with a folder exclusion argument, the rules will stop at the file argument match in the matched folder, and will not look for file matches in any subfolders.
|
|
|
|
|
> For example, you can exclude all files that start with "date" in the folders `c:\data\final\marked` and `c:\data\review\marked` by using the rule argument `c:\data\*\marked\date*`.
|
|
|
|
|
> This argument, however, will not match any files in subfolders under `c:\data\final\marked` or `c:\data\review\marked`.
|
|
|
|
|
|
|
|
|
|
<a id="review"></a>
|
|
|
|
|
|
|
|
|
@ -205,273 +196,68 @@ The following table describes how the wildcards can be used and provides some ex
|
|
|
|
|
|
|
|
|
|
The following table lists and describes the system account environment variables.
|
|
|
|
|
|
|
|
|
|
<table border="0" cellspacing="0" cellpadding="20">
|
|
|
|
|
<thead>
|
|
|
|
|
<tr>
|
|
|
|
|
<th valign="top">System environment variables</th>
|
|
|
|
|
<th valign="top">Will redirect to:</th>
|
|
|
|
|
</tr>
|
|
|
|
|
</thead><tbody>
|
|
|
|
|
<tr>
|
|
|
|
|
<td valign="top">%APPDATA%</td>
|
|
|
|
|
<td valign="top">C:\Users\UserName.DomainName\AppData\Roaming</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td valign="top">%APPDATA%\Microsoft\Internet Explorer\Quick Launch</td>
|
|
|
|
|
<td valign="top">C:\Windows\System32\config\systemprofile\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td valign="top">%APPDATA%\Microsoft\Windows\Start Menu</td>
|
|
|
|
|
<td valign="top">C:\Windows\System32\config\systemprofile\AppData\Roaming\Microsoft\Windows\Start Menu</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td valign="top">%APPDATA%\Microsoft\Windows\Start Menu\Programs</td>
|
|
|
|
|
<td valign="top">C:\Windows\System32\config\systemprofile\AppData\Roaming\Microsoft\Windows\Start Menu\Programs</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td valign="top">%LOCALAPPDATA% </td>
|
|
|
|
|
<td valign="top">C:\Windows\System32\config\systemprofile\AppData\Local</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td valign="top">%ProgramData%</td>
|
|
|
|
|
<td valign="top">C:\ProgramData</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td valign="top">%ProgramFiles%</td>
|
|
|
|
|
<td valign="top">C:\Program Files</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td valign="top">%ProgramFiles%\Common Files </td>
|
|
|
|
|
<td valign="top">C:\Program Files\Common Files</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td valign="top">%ProgramFiles%\Windows Sidebar\Gadgets </td>
|
|
|
|
|
<td valign="top">C:\Program Files\Windows Sidebar\Gadgets</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td valign="top">%ProgramFiles%\Common Files</td>
|
|
|
|
|
<td valign="top">C:\Program Files\Common Files</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td valign="top">%ProgramFiles(x86)% </td>
|
|
|
|
|
<td valign="top">C:\Program Files (x86)</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td valign="top">%ProgramFiles(x86)%\Common Files </td>
|
|
|
|
|
<td valign="top">C:\Program Files (x86)\Common Files</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td valign="top">%SystemDrive%</td>
|
|
|
|
|
<td valign="top">C:</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td valign="top">%SystemDrive%\Program Files</td>
|
|
|
|
|
<td valign="top">C:\Program Files</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td valign="top">%SystemDrive%\Program Files (x86) </td>
|
|
|
|
|
<td valign="top">C:\Program Files (x86)</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td valign="top">%SystemDrive%\Users </td>
|
|
|
|
|
<td valign="top">C:\Users</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td valign="top">%SystemDrive%\Users\Public</td>
|
|
|
|
|
<td valign="top">C:\Users\Public</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td valign="top">%SystemRoot%</td>
|
|
|
|
|
<td valign="top"> C:\Windows</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td valign="top">%windir%</td>
|
|
|
|
|
<td valign="top">C:\Windows</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td valign="top">%windir%\Fonts</td>
|
|
|
|
|
<td valign="top">C:\Windows\Fonts</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td valign="top">%windir%\Resources </td>
|
|
|
|
|
<td valign="top">C:\Windows\Resources</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td valign="top">%windir%\resources\0409</td>
|
|
|
|
|
<td valign="top">C:\Windows\resources\0409</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td valign="top">%windir%\system32</td>
|
|
|
|
|
<td valign="top">C:\Windows\System32</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td valign="top">%ALLUSERSPROFILE%</td>
|
|
|
|
|
<td valign="top">C:\ProgramData</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td valign="top">%ALLUSERSPROFILE%\Application Data</td>
|
|
|
|
|
<td valign="top">C:\ProgramData\Application Data</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td valign="top">%ALLUSERSPROFILE%\Documents</td>
|
|
|
|
|
<td valign="top">C:\ProgramData\Documents</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td valign="top">%ALLUSERSPROFILE%\Documents\My Music\Sample Music</td>
|
|
|
|
|
<td valign="top">
|
|
|
|
|
<p>C:\ProgramData\Documents\My Music\Sample Music</p>
|
|
|
|
|
<p>.</p>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td valign="top">%ALLUSERSPROFILE%\Documents\My Music </td>
|
|
|
|
|
<td valign="top">C:\ProgramData\Documents\My Music</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td valign="top">%ALLUSERSPROFILE%\Documents\My Pictures </td>
|
|
|
|
|
<td valign="top">
|
|
|
|
|
<p>C:\ProgramData\Documents\My Pictures
|
|
|
|
|
</p>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td valign="top">%ALLUSERSPROFILE%\Documents\My Pictures\Sample Pictures </td>
|
|
|
|
|
<td valign="top">C:\ProgramData\Documents\My Pictures\Sample Pictures</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td valign="top">%ALLUSERSPROFILE%\Documents\My Videos </td>
|
|
|
|
|
<td valign="top">C:\ProgramData\Documents\My Videos</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td valign="top">%ALLUSERSPROFILE%\Microsoft\Windows\DeviceMetadataStore </td>
|
|
|
|
|
<td valign="top">C:\ProgramData\Microsoft\Windows\DeviceMetadataStore</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td valign="top">%ALLUSERSPROFILE%\Microsoft\Windows\GameExplorer </td>
|
|
|
|
|
<td valign="top">C:\ProgramData\Microsoft\Windows\GameExplorer</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td valign="top">%ALLUSERSPROFILE%\Microsoft\Windows\Ringtones </td>
|
|
|
|
|
<td valign="top">C:\ProgramData\Microsoft\Windows\Ringtones</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td valign="top">%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu </td>
|
|
|
|
|
<td valign="top">C:\ProgramData\Microsoft\Windows\Start Menu</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td valign="top">%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs </td>
|
|
|
|
|
<td valign="top">C:\ProgramData\Microsoft\Windows\Start Menu\Programs </td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td valign="top">%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\Administrative Tools</td>
|
|
|
|
|
<td valign="top">C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Administrative Tools</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td valign="top">%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\StartUp </td>
|
|
|
|
|
<td valign="top">C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td valign="top">%ALLUSERSPROFILE%\Microsoft\Windows\Templates </td>
|
|
|
|
|
<td valign="top">C:\ProgramData\Microsoft\Windows\Templates</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td valign="top">%ALLUSERSPROFILE%\Start Menu </td>
|
|
|
|
|
<td valign="top">C:\ProgramData\Start Menu</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td valign="top">%ALLUSERSPROFILE%\Start Menu\Programs </td>
|
|
|
|
|
<td valign="top">C:\ProgramData\Start Menu\Programs</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td valign="top">%ALLUSERSPROFILE%\Start Menu\Programs\Administrative Tools </td>
|
|
|
|
|
<td valign="top">C:\ProgramData\Start Menu\Programs\Administrative Tools</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td valign="top">%ALLUSERSPROFILE%\Templates </td>
|
|
|
|
|
<td valign="top">C:\ProgramData\Templates</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td valign="top">%LOCALAPPDATA%\Microsoft\Windows\ConnectedSearch\Templates </td>
|
|
|
|
|
<td valign="top">C:\Windows\System32\config\systemprofile\AppData\Local\Microsoft\Windows\ConnectedSearch\Templates</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td valign="top">%LOCALAPPDATA%\Microsoft\Windows\History </td>
|
|
|
|
|
<td valign="top">C:\Windows\System32\config\systemprofile\AppData\Local\Microsoft\Windows\History</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td valign="top">
|
|
|
|
|
<p>
|
|
|
|
|
%PUBLIC% </p>
|
|
|
|
|
</td>
|
|
|
|
|
<td valign="top">C:\Users\Public</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td valign="top">%PUBLIC%\AccountPictures </td>
|
|
|
|
|
<td valign="top">C:\Users\Public\AccountPictures</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td valign="top">%PUBLIC%\Desktop </td>
|
|
|
|
|
<td valign="top">C:\Users\Public\Desktop</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td valign="top">%PUBLIC%\Documents </td>
|
|
|
|
|
<td valign="top">C:\Users\Public\Documents</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td valign="top">%PUBLIC%\Downloads </td>
|
|
|
|
|
<td valign="top">C:\Users\Public\Downloads</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td valign="top">%PUBLIC%\Music\Sample Music </td>
|
|
|
|
|
<td valign="top">
|
|
|
|
|
<p>C:\Users\Public\Music\Sample Music</p>
|
|
|
|
|
<p>.</p>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td valign="top">%PUBLIC%\Music\Sample Playlists </td>
|
|
|
|
|
<td valign="top">
|
|
|
|
|
<p>C:\Users\Public\Music\Sample Playlists</p>
|
|
|
|
|
<p>.</p>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td valign="top">%PUBLIC%\Pictures\Sample Pictures </td>
|
|
|
|
|
<td valign="top">C:\Users\Public\Pictures\Sample Pictures</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td valign="top">%PUBLIC%\RecordedTV.library-ms</td>
|
|
|
|
|
<td valign="top">C:\Users\Public\RecordedTV.library-ms</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td valign="top">%PUBLIC%\Videos</td>
|
|
|
|
|
<td valign="top">C:\Users\Public\Videos</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td valign="top">%PUBLIC%\Videos\Sample Videos</td>
|
|
|
|
|
<td valign="top">
|
|
|
|
|
<p>C:\Users\Public\Videos\Sample Videos</p>
|
|
|
|
|
<p>.</p>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td valign="top">%USERPROFILE% </td>
|
|
|
|
|
<td valign="top">C:\Windows\System32\config\systemprofile</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td valign="top">%USERPROFILE%\AppData\Local </td>
|
|
|
|
|
<td valign="top">C:\Windows\System32\config\systemprofile\AppData\Local</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td valign="top">%USERPROFILE%\AppData\LocalLow </td>
|
|
|
|
|
<td valign="top">C:\Windows\System32\config\systemprofile\AppData\LocalLow</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td valign="top">%USERPROFILE%\AppData\Roaming </td>
|
|
|
|
|
<td valign="top">C:\Windows\System32\config\systemprofile\AppData\Roaming</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
| This system environment variable... | Redirects to this |
|
|
|
|
|
|:--|:--|
|
|
|
|
|
| `%APPDATA%`| `C:\Users\UserName.DomainName\AppData\Roaming` |
|
|
|
|
|
| `%APPDATA%\Microsoft\Internet Explorer\Quick Launch` | `C:\Windows\System32\config\systemprofile\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch` |
|
|
|
|
|
| `%APPDATA%\Microsoft\Windows\Start Menu` | `C:\Windows\System32\config\systemprofile\AppData\Roaming\Microsoft\Windows\Start Menu` |
|
|
|
|
|
| `%APPDATA%\Microsoft\Windows\Start Menu\Programs` | `C:\Windows\System32\config\systemprofile\AppData\Roaming\Microsoft\Windows\Start Menu\Programs` |
|
|
|
|
|
| `%LOCALAPPDATA%` | `C:\Windows\System32\config\systemprofile\AppData\Local` |
|
|
|
|
|
| `%ProgramData%` | `C:\ProgramData` |
|
|
|
|
|
| `%ProgramFiles%` | `C:\Program Files` |
|
|
|
|
|
| `%ProgramFiles%\Common Files` | `C:\Program Files\Common Files` |
|
|
|
|
|
| `%ProgramFiles%\Windows Sidebar\Gadgets` | `C:\Program Files\Windows Sidebar\Gadgets` |
|
|
|
|
|
| `%ProgramFiles%\Common Files` | `C:\Program Files\Common Files` |
|
|
|
|
|
| `%ProgramFiles(x86)%` | `C:\Program Files (x86)` |
|
|
|
|
|
| `%ProgramFiles(x86)%\Common Files` | `C:\Program Files (x86)\Common Files` |
|
|
|
|
|
| `%SystemDrive%` | `C:` |
|
|
|
|
|
| `%SystemDrive%\Program Files` | `C:\Program Files` |
|
|
|
|
|
| `%SystemDrive%\Program Files (x86)` | `C:\Program Files (x86)` |
|
|
|
|
|
| `%SystemDrive%\Users` | `C:\Users` |
|
|
|
|
|
| `%SystemDrive%\Users\Public` | `C:\Users\Public` |
|
|
|
|
|
| `%SystemRoot%` | `C:\Windows` |
|
|
|
|
|
| `%windir%` | `C:\Windows` |
|
|
|
|
|
| `%windir%\Fonts` | `C:\Windows\Fonts` |
|
|
|
|
|
| `%windir%\Resources` | `C:\Windows\Resources` |
|
|
|
|
|
| `%windir%\resources\0409` | `C:\Windows\resources\0409` |
|
|
|
|
|
| `%windir%\system32` | `C:\Windows\System32` |
|
|
|
|
|
| `%ALLUSERSPROFILE%` | `C:\ProgramData` |
|
|
|
|
|
| `%ALLUSERSPROFILE%\Application Data` | `C:\ProgramData\Application Data` |
|
|
|
|
|
| `%ALLUSERSPROFILE%\Documents` | `C:\ProgramData\Documents` |
|
|
|
|
|
| `%ALLUSERSPROFILE%\Documents\My Music\Sample Music` | `C:\ProgramData\Documents\My Music\Sample Music` |
|
|
|
|
|
| `%ALLUSERSPROFILE%\Documents\My Music` | `C:\ProgramData\Documents\My Music` |
|
|
|
|
|
| `%ALLUSERSPROFILE%\Documents\My Pictures` | `C:\ProgramData\Documents\My Pictures` |
|
|
|
|
|
| `%ALLUSERSPROFILE%\Documents\My Pictures\Sample Pictures` | `C:\ProgramData\Documents\My Pictures\Sample Pictures` |
|
|
|
|
|
| `%ALLUSERSPROFILE%\Documents\My Videos` | `C:\ProgramData\Documents\My Videos` |
|
|
|
|
|
| `%ALLUSERSPROFILE%\Microsoft\Windows\DeviceMetadataStore` | `C:\ProgramData\Microsoft\Windows\DeviceMetadataStore` |
|
|
|
|
|
| `%ALLUSERSPROFILE%\Microsoft\Windows\GameExplorer` | `C:\ProgramData\Microsoft\Windows\GameExplorer` |
|
|
|
|
|
| `%ALLUSERSPROFILE%\Microsoft\Windows\Ringtones` | `C:\ProgramData\Microsoft\Windows\Ringtones` |
|
|
|
|
|
| `%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu` | `C:\ProgramData\Microsoft\Windows\Start Menu` |
|
|
|
|
|
| `%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs` | `C:\ProgramData\Microsoft\Windows\Start Menu\Programs` |
|
|
|
|
|
| `%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\Administrative Tools` | `C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Administrative Tools` |
|
|
|
|
|
| `%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\StartUp` | `C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp` |
|
|
|
|
|
| `%ALLUSERSPROFILE%\Microsoft\Windows\Templates` | `C:\ProgramData\Microsoft\Windows\Templates` |
|
|
|
|
|
| `%ALLUSERSPROFILE%\Start Menu` | `C:\ProgramData\Start Menu` |
|
|
|
|
|
| `%ALLUSERSPROFILE%\Start Menu\Programs` | C:\ProgramData\Start Menu\Programs |
|
|
|
|
|
| `%ALLUSERSPROFILE%\Start Menu\Programs\Administrative Tools` | `C:\ProgramData\Start Menu\Programs\Administrative Tools` |
|
|
|
|
|
| `%ALLUSERSPROFILE%\Templates` | `C:\ProgramData\Templates` |
|
|
|
|
|
| `%LOCALAPPDATA%\Microsoft\Windows\ConnectedSearch\Templates` | `C:\Windows\System32\config\systemprofile\AppData\Local\Microsoft\Windows\ConnectedSearch\Templates` |
|
|
|
|
|
| `%LOCALAPPDATA%\Microsoft\Windows\History` | `C:\Windows\System32\config\systemprofile\AppData\Local\Microsoft\Windows\History` |
|
|
|
|
|
| `%PUBLIC%` | `C:\Users\Public` |
|
|
|
|
|
| `%PUBLIC%\AccountPictures` | `C:\Users\Public\AccountPictures` |
|
|
|
|
|
| `%PUBLIC%\Desktop` | `C:\Users\Public\Desktop` |
|
|
|
|
|
| `%PUBLIC%\Documents` | `C:\Users\Public\Documents` |
|
|
|
|
|
| `%PUBLIC%\Downloads` | `C:\Users\Public\Downloads` |
|
|
|
|
|
| `%PUBLIC%\Music\Sample Music` | `C:\Users\Public\Music\Sample Music` |
|
|
|
|
|
| `%PUBLIC%\Music\Sample Playlists` | `C:\Users\Public\Music\Sample Playlists` |
|
|
|
|
|
| `%PUBLIC%\Pictures\Sample Pictures` | `C:\Users\Public\Pictures\Sample Pictures` |
|
|
|
|
|
| `%PUBLIC%\RecordedTV.library-ms` | `C:\Users\Public\RecordedTV.library-ms` |
|
|
|
|
|
| `%PUBLIC%\Videos` | `C:\Users\Public\Videos` |
|
|
|
|
|
| `%PUBLIC%\Videos\Sample Videos` | `C:\Users\Public\Videos\Sample Videos` |
|
|
|
|
|
| `%USERPROFILE%` | `C:\Windows\System32\config\systemprofile` |
|
|
|
|
|
| `%USERPROFILE%\AppData\Local` | `C:\Windows\System32\config\systemprofile\AppData\Local` |
|
|
|
|
|
| `%USERPROFILE%\AppData\LocalLow` | `C:\Windows\System32\config\systemprofile\AppData\LocalLow` |
|
|
|
|
|
| `%USERPROFILE%\AppData\Roaming` | `C:\Windows\System32\config\systemprofile\AppData\Roaming` |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Review the list of exclusions
|
|
|
|
@ -490,7 +276,7 @@ You can retrieve the items in the exclusion list using one of the following meth
|
|
|
|
|
|
|
|
|
|
If you use PowerShell, you can retrieve the list in two ways:
|
|
|
|
|
|
|
|
|
|
- Retrieve the status of all Microsoft Defender Antivirus preferences. Each of the lists are displayed on separate lines, but the items within each list are combined into the same line.
|
|
|
|
|
- Retrieve the status of all Microsoft Defender Antivirus preferences. Each list is displayed on separate lines, but the items within each list are combined into the same line.
|
|
|
|
|
- Write the status of all preferences to a variable, and use that variable to only call the specific list you are interested in. Each use of `Add-MpPreference` is written to a new line.
|
|
|
|
|
|
|
|
|
|
### Validate the exclusion list by using MpCmdRun
|
|
|
|
|