Skip to content

Commit a78c493

Browse files
authored
Merge pull request MicrosoftDocs#2597 from TimShererWithAquent/defender-v-tishe
Defender PowerShell reference update
2 parents a6b652e + d97871a commit a78c493

File tree

3 files changed

+2167
-76
lines changed

3 files changed

+2167
-76
lines changed

docset/winserver2022-ps/defender/Add-MpPreference.md

Lines changed: 111 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
description: Use this topic to help manage Windows and Windows Server technologies with Windows PowerShell.
2+
description: The Add-MpPreference cmdlet modifies settings for Windows Defender.
33
external help file: MSFT_MpPreference.cdxml-help.xml
44
Module Name: Defender
55
ms.date: 12/20/2016
@@ -17,8 +17,11 @@ Modifies settings for Windows Defender.
1717

1818
```
1919
Add-MpPreference [-ExclusionPath <String[]>] [-ExclusionExtension <String[]>] [-ExclusionProcess <String[]>]
20-
[-ThreatIDDefaultAction_Ids <Int64[]>] [-ThreatIDDefaultAction_Actions <ThreatAction[]>] [-Force]
21-
[-CimSession <CimSession[]>] [-ThrottleLimit <Int32>] [-AsJob] [<CommonParameters>]
20+
[-ExclusionIpAddress <String[]>] [-ThreatIDDefaultAction_Ids <Int64[]>]
21+
[-ThreatIDDefaultAction_Actions <ThreatAction[]>] [-AttackSurfaceReductionOnlyExclusions <String[]>]
22+
[-ControlledFolderAccessAllowedApplications <String[]>] [-ControlledFolderAccessProtectedFolders <String[]>]
23+
[-AttackSurfaceReductionRules_Ids <String[]>] [-AttackSurfaceReductionRules_Actions <ASRRuleActionType[]>]
24+
[-Force] [-CimSession <CimSession[]>] [-ThrottleLimit <Int32>] [-AsJob] [<CommonParameters>]
2225
```
2326

2427
## DESCRIPTION
@@ -28,13 +31,20 @@ Use this cmdlet to add exclusions for file name extensions, paths, and processes
2831
## EXAMPLES
2932

3033
### Example 1: Add a folder to the exclusion list
31-
```
32-
PS C:\> Add-MpPreference -ExclusionPath "C:\Temp"
34+
```powershell
35+
Add-MpPreference -ExclusionPath "C:\Temp"
3336
```
3437

3538
This command adds the folder C:\Temp to the exclusion list.
3639
The command disables Windows Defender scheduled and real-time scanning for files in this folder.
3740

41+
### Example 2: Allow an application to access folders
42+
```powershell
43+
Add-MpPreference -ControlledFolderAccessAllowedApplications "c:\apps\test.exe"
44+
```
45+
46+
This command allows the specified application to make changes in controlled folders.
47+
3848
## PARAMETERS
3949

4050
### -AsJob
@@ -59,6 +69,57 @@ Accept pipeline input: False
5969
Accept wildcard characters: False
6070
```
6171
72+
### -AttackSurfaceReductionOnlyExclusions
73+
Specifies the files and paths to exclude from Attack Surface Reduction (ASR) rules. Specify the folders or files and resources that should be excluded from ASR rules. Enter a folder path or a fully qualified resource name. For example, ""C:\Windows"" will exclude all files in that directory. ""C:\Windows\App.exe"" will exclude only that specific file in that specific folder.
74+
75+
For more information about excluding files and folders from [ASR rules](https://docs.microsoft.com/windows/security/threat-protection/microsoft-defender-atp/enable-attack-surface-reduction#exclude-files-and-folders-from-asr-rules).
76+
77+
```yaml
78+
Type: String[]
79+
Parameter Sets: (All)
80+
Aliases:
81+
82+
Required: False
83+
Position: Named
84+
Default value: None
85+
Accept pipeline input: False
86+
Accept wildcard characters: False
87+
```
88+
89+
### -AttackSurfaceReductionRules_Actions
90+
Specifies the states of attack surface reduction rules specified by using the **AttackSurfaceReductionRules_Ids** parameter.
91+
If you add multiple rules as a comma-separated list, specify their states separately as a comma-separated list.
92+
93+
```yaml
94+
Type: ASRRuleActionType[]
95+
Parameter Sets: (All)
96+
Aliases:
97+
98+
Required: False
99+
Position: Named
100+
Default value: None
101+
Accept pipeline input: False
102+
Accept wildcard characters: False
103+
```
104+
105+
### -AttackSurfaceReductionRules_Ids
106+
Specifies the IDs of attack surface reduction rules.
107+
Use the **AttackSurfaceReductionRules_Actions** parameter to specify the state for each rule.
108+
If you add multiple rules as a comma-separated list, specify their states separately as a comma-separated list.
109+
110+
111+
```yaml
112+
Type: String[]
113+
Parameter Sets: (All)
114+
Aliases:
115+
116+
Required: False
117+
Position: Named
118+
Default value: None
119+
Accept pipeline input: False
120+
Accept wildcard characters: False
121+
```
122+
62123
### -CimSession
63124
Runs the cmdlet in a remote session or on a remote computer.
64125
Enter a computer name or a session object, such as the output of a [New-CimSession](https://go.microsoft.com/fwlink/p/?LinkId=227967) or [Get-CimSession](https://go.microsoft.com/fwlink/p/?LinkId=227966) cmdlet.
@@ -76,10 +137,55 @@ Accept pipeline input: False
76137
Accept wildcard characters: False
77138
```
78139
140+
### -ControlledFolderAccessAllowedApplications
141+
Specifies applications that can make changes in controlled folders.
142+
143+
```yaml
144+
Type: String[]
145+
Parameter Sets: (All)
146+
Aliases:
147+
148+
Required: False
149+
Position: Named
150+
Default value: None
151+
Accept pipeline input: False
152+
Accept wildcard characters: False
153+
```
154+
155+
### -ControlledFolderAccessProtectedFolders
156+
Specifies more folders to protect.
157+
158+
```yaml
159+
Type: String[]
160+
Parameter Sets: (All)
161+
Aliases:
162+
163+
Required: False
164+
Position: Named
165+
Default value: None
166+
Accept pipeline input: False
167+
Accept wildcard characters: False
168+
```
169+
79170
### -ExclusionExtension
80171
Specifies an array of file name extensions, such as obj or lib, to exclude from scheduled, custom, and real-time scanning.
81172
This cmdlet adds these file name extensions to the exclusions.
82173
174+
```yaml
175+
Type: String[]
176+
Parameter Sets: (All)
177+
Aliases:
178+
179+
Required: False
180+
Position: Named
181+
Default value: None
182+
Accept pipeline input: False
183+
Accept wildcard characters: False
184+
```
185+
186+
### -ExclusionIpAddress
187+
Specifies an array of IP addresses to exclude from scheduled and real-time scanning.
188+
83189
```yaml
84190
Type: String[]
85191
Parameter Sets: (All)

0 commit comments

Comments
 (0)