Skip to content

Commit ef8ecc6

Browse files
JoelJerkinsdwheeler
authored andcommitted
Update Add-MpPreference.md
Updated file to match version for Windows Server 2022
1 parent ffb59c4 commit ef8ecc6

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

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

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,20 @@ Use this cmdlet to add exclusions for file name extensions, paths, and processes
3131
## EXAMPLES
3232

3333
### Example 1: Add a folder to the exclusion list
34-
```
35-
PS C:\> Add-MpPreference -ExclusionPath "C:\Temp"
34+
```powershell
35+
Add-MpPreference -ExclusionPath "C:\Temp"
3636
```
3737

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

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+
4148
## PARAMETERS
4249

4350
### -AsJob

0 commit comments

Comments
 (0)