mirror of
https://github.com/MicrosoftDocs/windows-itpro-docs.git
synced 2025-05-18 16:27:22 +00:00
Update configure-process-opened-file-exclusions-microsoft-defender-antivirus.md
This commit is contained in:
parent
c99aaeaef1
commit
a6e1144176
@ -26,15 +26,16 @@ manager: dansimp
|
|||||||
|
|
||||||
You can exclude files that have been opened by specific processes from Microsoft Defender Antivirus scans. See [Recommendations for defining exclusions](configure-exclusions-microsoft-defender-antivirus.md#recommendations-for-defining-exclusions) before defining your exclusion lists.
|
You can exclude files that have been opened by specific processes from Microsoft Defender Antivirus scans. See [Recommendations for defining exclusions](configure-exclusions-microsoft-defender-antivirus.md#recommendations-for-defining-exclusions) before defining your exclusion lists.
|
||||||
|
|
||||||
This topic describes how to configure exclusion lists for the following:
|
This article describes how to configure exclusion lists.
|
||||||
|
|
||||||
<a id="examples"></a>
|
## Examples of exclusions
|
||||||
|
|
||||||
|
|Exclusion | Example |
|
||||||
|
|---|---|
|
||||||
|
|Any file on the machine that is opened by any process with a specific file name | Specifying `test.exe` would exclude files opened by: <br/>`c:\sample\test.exe`<br/>`d:\internal\files\test.exe` |
|
||||||
|
|Any file on the machine that is opened by any process under a specific folder | Specifying `c:\test\sample\*` would exclude files opened by:<br/>`c:\test\sample\test.exe`<br/>`c:\test\sample\test2.exe`<br/>`c:\test\sample\utility.exe` |
|
||||||
|
|Any file on the machine that is opened by a specific process in a specific folder | Specifying `c:\test\process.exe` would exclude files only opened by `c:\test\process.exe` |
|
||||||
|
|
||||||
Exclusion | Example
|
|
||||||
---|---
|
|
||||||
Any file on the machine that is opened by any process with a specific file name | Specifying "test.exe" would exclude files opened by: <ul><li>c:\sample\test.exe</li><li>d:\internal\files\test.exe</li></ul>
|
|
||||||
Any file on the machine that is opened by any process under a specific folder | Specifying "c:\test\sample\\*" would exclude files opened by:<ul><li>c:\test\sample\test.exe</li><li>c:\test\sample\test2.exe</li><li>c:\test\sample\utility.exe</li></ul>
|
|
||||||
Any file on the machine that is opened by a specific process in a specific folder | Specifying "c:\test\process.exe" would exclude files only opened by c:\test\process.exe
|
|
||||||
|
|
||||||
When you add a process to the process exclusion list, Microsoft Defender Antivirus won't scan files opened by that process, no matter where the files are located. The process itself, however, will be scanned unless it has also been added to the [file exclusion list](configure-extension-file-exclusions-microsoft-defender-antivirus.md).
|
When you add a process to the process exclusion list, Microsoft Defender Antivirus won't scan files opened by that process, no matter where the files are located. The process itself, however, will be scanned unless it has also been added to the [file exclusion list](configure-extension-file-exclusions-microsoft-defender-antivirus.md).
|
||||||
|
|
||||||
@ -46,14 +47,12 @@ You can add, remove, and review the lists for exclusions in [Group Policy](#gp),
|
|||||||
|
|
||||||
You can also [use PowerShell cmdlets and WMI to configure the exclusion lists](#ps), including [reviewing](#review) your lists.
|
You can also [use PowerShell cmdlets and WMI to configure the exclusion lists](#ps), including [reviewing](#review) your lists.
|
||||||
|
|
||||||
By default, local changes made to the lists (by users with administrator privileges; this includes 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 will take precedence in the case of conflicts.
|
By default, local changes made to the lists (by users with administrator privileges; 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 will take precedence in the case of conflicts.
|
||||||
|
|
||||||
You can [configure how locally and globally defined exclusions lists are merged](configure-local-policy-overrides-microsoft-defender-antivirus.md#merge-lists) to allow local changes to override managed deployment settings.
|
You can [configure how locally and globally defined exclusions lists are merged](configure-local-policy-overrides-microsoft-defender-antivirus.md#merge-lists) to allow local changes to override managed deployment settings.
|
||||||
|
|
||||||
## Configure the list of exclusions for files opened by specified processes
|
## Configure the list of exclusions for files opened by specified processes
|
||||||
|
|
||||||
<a id="gp"></a>
|
|
||||||
|
|
||||||
### Use Microsoft Intune to exclude files that have been opened by specified processes from scans
|
### Use Microsoft Intune to exclude files that have been opened by specified processes from scans
|
||||||
|
|
||||||
See [Configure device restriction settings in Microsoft Intune](https://docs.microsoft.com/intune/device-restrictions-configure) and [Microsoft Defender Antivirus device restriction settings for Windows 10 in Intune](https://docs.microsoft.com/intune/device-restrictions-windows-10#microsoft-defender-antivirus) for more details.
|
See [Configure device restriction settings in Microsoft Intune](https://docs.microsoft.com/intune/device-restrictions-configure) and [Microsoft Defender Antivirus device restriction settings for Windows 10 in Intune](https://docs.microsoft.com/intune/device-restrictions-windows-10#microsoft-defender-antivirus) for more details.
|
||||||
@ -80,8 +79,6 @@ See [How to create and deploy antimalware policies: Exclusion settings](https://
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
<a id="ps"></a>
|
|
||||||
|
|
||||||
### Use PowerShell cmdlets to exclude files that have been opened by specified processes from scans
|
### Use PowerShell cmdlets to exclude files that have been opened by specified processes from scans
|
||||||
|
|
||||||
Using PowerShell to add or remove exclusions for files that have been opened by processes requires using a combination of three cmdlets with the `-ExclusionProcess` parameter. The cmdlets are all in the [Defender module](https://technet.microsoft.com/itpro/powershell/windows/defender/defender).
|
Using PowerShell to add or remove exclusions for files that have been opened by processes requires using a combination of three cmdlets with the `-ExclusionProcess` parameter. The cmdlets are all in the [Defender module](https://technet.microsoft.com/itpro/powershell/windows/defender/defender).
|
||||||
@ -94,11 +91,11 @@ The format for the cmdlets is:
|
|||||||
|
|
||||||
The following are allowed as the \<cmdlet>:
|
The following are allowed as the \<cmdlet>:
|
||||||
|
|
||||||
Configuration action | PowerShell cmdlet
|
|Configuration action | PowerShell cmdlet |
|
||||||
---|---
|
|---|---|
|
||||||
Create or overwrite the list | `Set-MpPreference`
|
|Create or overwrite the list | `Set-MpPreference` |
|
||||||
Add to the list | `Add-MpPreference`
|
|Add to the list | `Add-MpPreference` |
|
||||||
Remove items from the list | `Remove-MpPreference`
|
|Remove items from the list | `Remove-MpPreference` |
|
||||||
|
|
||||||
>[!IMPORTANT]
|
>[!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.
|
>If you have created a list, either with `Set-MpPreference` or `Add-MpPreference`, using the `Set-MpPreference` cmdlet again will overwrite the existing list.
|
||||||
@ -109,7 +106,7 @@ For example, the following code snippet would cause Microsoft Defender AV scans
|
|||||||
Add-MpPreference -ExclusionProcess "c:\internal\test.exe"
|
Add-MpPreference -ExclusionProcess "c:\internal\test.exe"
|
||||||
```
|
```
|
||||||
|
|
||||||
See [Manage antivirus with PowerShell cmdlets](use-powershell-cmdlets-windows-defender-Microsoft Defender Antivirus.md) and [Defender cmdlets](https://technet.microsoft.com/itpro/powershell/windows/defender/index) for more information on how to use PowerShell with Microsoft Defender Antivirus.
|
For more information on how to use PowerShell with Microsoft Defender Antivirus, see [Manage antivirus with PowerShell cmdlets](use-powershell-cmdlets-windows-defender-Microsoft Defender Antivirus.md) and [Microsoft Defender Antivirus cmdlets](https://docs.microsoft.com/powershell/module/defender/?view=win10-ps&preserve=true).
|
||||||
|
|
||||||
### Use Windows Management Instruction (WMI) to exclude files that have been opened by specified processes from scans
|
### Use Windows Management Instruction (WMI) to exclude files that have been opened by specified processes from scans
|
||||||
|
|
||||||
@ -121,33 +118,24 @@ ExclusionProcess
|
|||||||
|
|
||||||
The use of **Set**, **Add**, and **Remove** is analogous to their counterparts in PowerShell: `Set-MpPreference`, `Add-MpPreference`, and `Remove-MpPreference`.
|
The use of **Set**, **Add**, and **Remove** is analogous to their counterparts in PowerShell: `Set-MpPreference`, `Add-MpPreference`, and `Remove-MpPreference`.
|
||||||
|
|
||||||
See the following for more information and allowed parameters:
|
For more information and allowed parameters, see [Windows Defender WMIv2 APIs](https://msdn.microsoft.com/library/dn439477(v=vs.85).aspx).
|
||||||
|
|
||||||
- [Windows Defender WMIv2 APIs](https://msdn.microsoft.com/library/dn439477(v=vs.85).aspx)
|
|
||||||
|
|
||||||
<a id="man-tools"></a>
|
|
||||||
|
|
||||||
### Use the Windows Security app to exclude files that have been opened by specified processes from scans
|
### Use the Windows Security app to exclude files that have been opened by specified processes from scans
|
||||||
|
|
||||||
See [Add exclusions in the Windows Security app](microsoft-defender-security-center-antivirus.md#exclusions) for instructions.
|
See [Add exclusions in the Windows Security app](microsoft-defender-security-center-antivirus.md#exclusions) for instructions.
|
||||||
|
|
||||||
<a id="wildcards"></a>
|
|
||||||
|
|
||||||
## Use wildcards in the process exclusion list
|
## Use wildcards in the process exclusion list
|
||||||
|
|
||||||
The use of wildcards in the process exclusion list is different from their use in other exclusion lists.
|
The use of wildcards in the process exclusion list is different from their use in other exclusion lists.
|
||||||
|
|
||||||
In particular, you cannot use the question mark ? wildcard, and the asterisk \* wildcard can only be used at the end of a complete path. You can still use environment variables (such as %ALLUSERSPROFILE%) as wildcards when defining items in the process exclusion list.
|
In particular, you cannot use the question mark (`?`) wildcard, and the asterisk (`*`) wildcard can only be used at the end of a complete path. You can still use environment variables (such as `%ALLUSERSPROFILE%`) as wildcards when defining items in the process exclusion list.
|
||||||
|
|
||||||
The following table describes how the wildcards can be used in the process exclusion list:
|
The following table describes how the wildcards can be used in the process exclusion list:
|
||||||
|
|
||||||
Wildcard | Use | Example use | Example matches
|
|Wildcard | Example use | Example matches |
|
||||||
---|---|---|---
|
|:---|:---|:---|
|
||||||
\* (asterisk) | Replaces any number of characters | <ul><li>C:\MyData\\*</li></ul> | <ul><li>Any file opened by C:\MyData\file.exe</li></ul>
|
|`*` (asterisk) <br/><br/> Replaces any number of characters | `C:\MyData\*` | Any file opened by `C:\MyData\file.exe` |
|
||||||
? (question mark) | Not available | \- | \-
|
|Environment variables <br/><br/> The defined variable is populated as a path when the exclusion is evaluated | `%ALLUSERSPROFILE%\CustomLogFiles\file.exe` | Any file opened by `C:\ProgramData\CustomLogFiles\file.exe` |
|
||||||
Environment variables | The defined variable will be populated as a path when the exclusion is evaluated | <ul><li>%ALLUSERSPROFILE%\CustomLogFiles\file.exe</li></ul> | <ul><li>Any file opened by C:\ProgramData\CustomLogFiles\file.exe</li></ul>
|
|
||||||
|
|
||||||
<a id="review"></a>
|
|
||||||
|
|
||||||
## Review the list of exclusions
|
## Review the list of exclusions
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user