Skip to content

Commit 52a3874

Browse files
committed
Learn Editor: Update deployment-vdi-microsoft-defender-antivirus.md
1 parent 20aeaa3 commit 52a3874

File tree

1 file changed

+142
-56
lines changed

1 file changed

+142
-56
lines changed

defender-endpoint/deployment-vdi-microsoft-defender-antivirus.md

Lines changed: 142 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,15 @@ In Windows 10, version 1903, Microsoft introduced the shared security intelligen
6464

6565
A field automatically appears.
6666

67-
5. Enter `\\<Windows File Server shared location\>\wdav-update` (for help with this value, see [Download and unpackage](#download-and-unpackage-the-latest-updates)).
67+
1. Enter `\\<File Server shared location\>\wdav-update` (for help with this value, see [Download and unpackage](#download-and-unpackage-the-latest-updates)).
6868

6969
6. Select **OK**, and then deploy the Group Policy Object to the VMs you want to test.
7070

7171
### PowerShell
7272

7373
1. On each RDS or VDI device, use the following cmdlet to enable the feature:
7474

75-
`Set-MpPreference -SharedSignaturesPath \\<Windows File Server shared location>\wdav-update`
75+
`Set-MpPreference -SharedSignaturesPath \\<File Server shared location>\wdav-update`
7676

7777
2. Push the update as you normally would push PowerShell-based configuration policies onto your VMs. (See the [Download and unpackage](#download-and-unpackage-the-latest-updates) section in this article. Look for the *shared location* entry.)
7878

@@ -101,9 +101,9 @@ You can also set up your single server or machine to fetch the updates on behalf
101101

102102
1. Create an SMB/CIFS file share.
103103

104-
2. Use the following example to create a file share with the following share permissions.
104+
1. Use the following example to create a file share with the following share permissions.
105105

106-
```PowerShell
106+
```PowerShell
107107
108108
PS c:\> Get-SmbShareAccess -Name mdatp$
109109
@@ -113,10 +113,10 @@ You can also set up your single server or machine to fetch the updates on behalf
113113
114114
```
115115

116-
> [!NOTE]
116+
> [!NOTE]
117117
> An NTFS permission is added for **Authenticated Users:Read:**.
118118
119-
For this example, the file share is `\\WindowsFileServer.fqdn\mdatp$\wdav-update`.
119+
For this example, the file share is `\\FileServer.fqdn\mdatp$\wdav-update`.
120120

121121
### Set a scheduled task to run the PowerShell script
122122

@@ -158,115 +158,200 @@ If you would prefer to do everything manually, here's what to do to replicate th
158158
> [!NOTE]
159159
> The VMs will pick up the updated package whenever a new GUID folder is created with an extracted update package or whenever an existing folder is updated with a new extracted package.
160160
161-
## Randomize scheduled scans
161+
## Microsoft Defender Antivirus configuration settings
162162

163-
Scheduled scans run in addition to [real-time protection and scanning](configure-real-time-protection-microsoft-defender-antivirus.md).
163+
It’s important to take advantage of the included threat protection capabilities by enabling them with the following recommended configuration settings.  It’s optimized for VDI environments.
164164

165-
The start time of the scan itself is still based on the scheduled scan policy (**ScheduleDay**, **ScheduleTime**, and **ScheduleQuickScanTime**). Randomization causes Microsoft Defender Antivirus to start a scan on each machine within a four-hour window from the time set for the scheduled scan.
165+
> [!TIP]
166+
> The latest Windows group policy administrative templates are available in [Create and manage Central Store](/troubleshoot/windows-client/group-policy/create-and-manage-central-store).
166167
167-
See [Schedule scans](schedule-antivirus-scans.md) for other configuration options available for scheduled scans.
168+
### Root
168169

169-
## Use quick scans
170+
Configure detection for potentially unwanted applications: Enabled - Block
170171

171-
You can specify the type of scan that should be performed during a scheduled scan. Quick scans are the preferred approach as they're designed to look in all places where malware needs to reside to be active. The following procedure describes how to set up quick scans using Group Policy.
172+
Configure local administrator merge behavior for lists: Disabled
172173

173-
1. In your Group Policy Editor, go to **Administrative templates** \> **Windows components** \> **Microsoft Defender Antivirus** \> **Scan**.
174+
Control whether or not exclusions are visible to Local Admins: Enabled
174175

175-
2. Select **Specify the scan type to use for a scheduled scan** and then edit the policy setting.
176+
Turn off routine remediation: Disabled
176177

177-
3. Set the policy to **Enabled**, and then under **Options**, select **Quick scan**.
178+
Randomize scheduled scans: Enabled
178179

179-
4. Select **OK**.
180180

181-
5. Deploy your Group Policy object as you usually do.
182181

183-
## Prevent notifications
182+
### Client Interface
184183

185-
Sometimes, Microsoft Defender Antivirus notifications are sent to or persist across multiple sessions. To help avoid user confusion, you can lock down the Microsoft Defender Antivirus user interface. The following procedure describes how to suppress notifications using Group Policy.
184+
Enable headless UI mode: Enabled
186185

187-
1. In your Group Policy Editor, go to **Windows components** \> **Microsoft Defender Antivirus** \> **Client Interface**.
186+
> [!NOTE]
187+
> This policy hides the entire Microsoft Defender Antivirus user interface from end users in your organization.
188188
189-
2. Select **Suppress all notifications** and then edit the policy settings.
189+
Suppress all notifications: Enabled
190190

191-
3. Set the policy to **Enabled**, and then select **OK**.
191+
> [!NOTE]
192+
> Sometimes, Microsoft Defender Antivirus notifications are sent to or persist across multiple sessions. To help avoid user confusion, you can lock down the Microsoft Defender Antivirus user interface.
193+
> Suppressing notifications prevents notifications from Microsoft Defender Antivirus from showing up when scans are done or remediation actions are taken. However, your security operations team sees the results of a scan if an attack is detected and stopped. Alerts, such as an initial access alert, are generated, and appear in the [Microsoft Defender portal](https://security.microsoft.com).
192194
193-
4. Deploy your Group Policy object as you usually do.
195+
### MAPS
194196

195-
Suppressing notifications prevents notifications from Microsoft Defender Antivirus from showing up when scans are done or remediation actions are taken. However, your security operations team sees the results of a scan if an attack is detected and stopped. Alerts, such as an initial access alert, are generated, and appear in the [Microsoft Defender portal](https://security.microsoft.com).
197+
Join Microsoft MAPS (Turn on cloud-delivered protection): Enabled - Advanced MAPS
196198

197-
## Disable scans after an update
199+
Send file samples when further analysis is required: Send all samples (more secure) or Send safe sample (less secure)
198200

199-
Disabling a scan after an update prevents a scan from occurring after receiving an update. You can apply this setting when creating the base image if you have also run a quick scan. This way, you can prevent the newly updated VM from performing a scan again (as you've already scanned it when you created the base image).
201+
### MPEngine
200202

201-
> [!IMPORTANT]
202-
> Running scans after an update helps ensure your VMs are protected with the latest security intelligence updates. Disabling this option reduces the protection level of your VMs and should only be used when first creating or deploying the base image.
203+
Configure extended cloud check: 20
203204

204-
1. In your Group Policy Editor, go to **Windows components** \> **Microsoft Defender Antivirus** \> **Security Intelligence Updates**.
205+
Select cloud protection level: Enabled - High
205206

206-
2. Select **Turn on scan after security intelligence update** and then edit the policy setting.
207+
Enable file hash computation feature: Enabled
207208

208-
3. Set the policy to **Disabled**.
209+
> [!NOTE]
210+
> "Enable file hash computation feature" is only needed if using Indicators – File hash.  It can cause higher amount of CPU utilization, since it has to parse thru each binary on disk to get the file hash.
209211
210-
4. Select **OK**.
212+
### Real-time Protection
211213

212-
5. Deploy your Group Policy object as you usually do.
214+
Configure monitoring for incoming and outgoing file and program activity: Enabled – bi-directional (full on-access)
213215

214-
This policy prevents a scan from running immediately after an update.
216+
Monitor file and program activity on your computer: Enabled
215217

216-
## Disable the `ScanOnlyIfIdle` option
218+
Scan all downloaded files and attachments: Enabled
217219

218-
Use the following cmdlet, to stop a quick or scheduled scan whenever the device goes idle if it is in passive mode.
220+
Turn on behavior monitoring: Enabled
219221

220-
```PowerShell
222+
Turn on process scanning whenever real-time protection is enabled: Enabled
223+
224+
Turn on raw volume write notifications: Enabled
225+
226+
### Scans
227+
228+
Check for the latest virus and spyware security intelligence before running a scheduled scan: Enabled
229+
230+
Scan archive files: Enabled
231+
232+
Scan network files: Not configured
233+
234+
Scan packed executables: Enabled
235+
236+
Scan removable drives: Enabled
237+
238+
Turn on catch-up full scan (Disable catch-up full scan): Not configured
239+
240+
Turn on catch-up quick scan (Disable catchup quick scan): Not configured
241+
242+
> [!NOTE]
243+
> If you want to harden, you could change "Turn on catch-up quick scan" to enabled, which will help when VMs have been offline, and have missed two or more consecutive scheduled scans.  But since it is running a scheduled scan, it will use additional CPU.
244+
245+
Turn on e-mail scanning: Enabled
246+
247+
Turn on heuristics: Enabled
248+
249+
Turn on reparse point scanning: Enabled
250+
251+
#### __General scheduled scan settings__
252+
253+
Configure low CPU priority for scheduled scans (Use low CPU priority for scheduled scans): Not configured
254+
255+
Specify the maximum percentage of CPU utilization during a scan (CPU usage limit per scan): 50
256+
257+
Start the scheduled scan only when computer is on but not in use (ScanOnlyIfIdle): Not configured
258+
259+
Use the following cmdlet, to stop a quick or scheduled scan whenever the device goes idle if it is in passive mode.
260+
261+
262+
263+
264+
```powershell
221265
Set-MpPreference -ScanOnlyIfIdleEnabled $false
222266
```
223267

224-
You can also disable the `ScanOnlyIfIdle` option in Microsoft Defender Antivirus by configuration via local or domain group policy. This setting prevents significant CPU contention in high density environments.
268+
> [!TIP]
269+
> "Start the scheduled scan only when computer is on but not in use" setting prevents significant CPU contention in high density environments.
270+
271+
#### __Daily quick scan__
272+
273+
Specify the interval to run quick scans per day: Not configured
274+
275+
Specify the time for a daily quick scan (Run daily quick scan at): 12 PM
276+
225277

226-
For more information, see [Start the scheduled scan only when computer is on but not in use](https://admx.help/?Category=SystemCenterEndpointProtection&Policy=Microsoft.Policies.Antimalware::scan_scanonlyifidle).
227278

228-
## Scan VMs that have been offline
279+
#### __Run a weekly scheduled scan (quick or full)__
229280

230-
1. In your Group Policy Editor, go to **Windows components** \> **Microsoft Defender Antivirus** \> **Scan**.
281+
Specify the scan type to use for a scheduled scan (Scan type): Not configured
231282

232-
2. Select **Turn on catch-up quick scan** and then edit the policy setting.
283+
Specify the time of day to run a scheduled scan (Day of week to run scheduled scan): Not configured
233284

234-
3. Set the policy to **Enabled**.
285+
Specify the day of the week to run a scheduled scan (Time of day to run a scheduled scan): Not configured
286+
287+
### Security Intelligence Updates
288+
289+
Turn on scan after security intelligence update (Disable scans after an update): Disabled
290+
291+
> [!NOTE]
292+
> Disabling a scan after a security intelligence update prevents a scan from occurring after receiving an update. You can apply this setting when creating the base image if you have also run a quick scan. This way, you can prevent the newly updated VM from performing a scan again (as you've already scanned it when you created the base image).
293+
294+
> [!IMPORTANT]
295+
> Running scans after an update helps ensure your VMs are protected with the latest security intelligence updates. Disabling this option reduces the protection level of your VMs and should only be used when first creating or deploying the base image.
235296
236-
4. Select **OK**.
297+
Specify the interval to check for security intelligence updates (Enter how often to check for security intelligence updates): Enabled - 8
237298

238-
5. Deploy your Group Policy Object as you usually do.
299+
Leave other settings in default state
239300

240-
This policy forces a scan if the VM missed two or more consecutive scheduled scans.
301+
### Threats
241302

242-
## Enable headless UI mode
303+
Specify threat alert levels at which default action should not be taken when detected: Enabled. Set Severe (5), High (4), Medium (2) and Low (1), all to quarantine (2)
243304

244-
1. In your Group Policy Editor, go to **Windows components** \> **Microsoft Defender Antivirus** \> **Client Interface**.
305+
|Value name|Value |
306+
| -------- | -------- |
307+
|1 |2 |
308+
|2|2|
309+
|4|2|
310+
|5|2|
245311

246-
2. Select **Enable headless UI mode** and edit the policy.
312+
### Attack surface reduction rules
247313

248-
3. Set the policy to **Enabled**.
314+
Configure all available rules to Audit.
249315

250-
4. Select **OK**.
251316

252-
5. Deploy your Group Policy Object as you usually do.
253317

254-
This policy hides the entire Microsoft Defender Antivirus user interface from end users in your organization.
318+
### Enable network protection
319+
320+
Prevent users and apps from accessing dangerous websites (Enable network protection): Enabled - Audit mode
321+
322+
### SmartScreen for Microsoft Edge
323+
324+
Require SmartScreen for Microsoft Edge: Yes
325+
326+
Block malicious site access: Yes
327+
328+
Block unverified file download: Yes
255329

256330
## Run the "Windows Defender Cache Maintenance" scheduled task
257331

258332
Optimize the "Windows Defender Cache Maintenance" scheduled task for non-persistent and/or persistent VDI environments. Run this task on the main image before sealing.
259333

260334
1. Open up the **Task Scheduler** mmc (`taskschd.msc`).
261335

262-
2. Expand **Task Scheduler Library** > **Microsoft** > **Windows** > **Windows Defender**, and then right-click on **Windows Defender Cache Maintenance**.
336+
1. Expand **Task Scheduler Library** > **Microsoft** > **Windows** > **Windows Defender**, and then right-click on **Windows Defender Cache Maintenance**.
337+
338+
1. Select **Run**, and let the scheduled task finish.
263339

264-
3. Select **Run**, and let the scheduled task finish.
340+
1. > [!WARNING]
341+
> If you do not do this, it can cause higher cpu utilization while the cache maintenance task is running on each of the VMs.
265342
266-
## Exclusions
343+
### Enable Tamper protection
344+
345+
Enable tamper protection to prevent Microsoft Defender being disabled in the Microsoft Defender XDR portal (security.microsoft.com).
346+
347+
### Exclusions
267348

268349
If you think you need to add exclusions, see [Manage exclusions for Microsoft Defender for Endpoint and Microsoft Defender Antivirus](defender-endpoint-antivirus-exclusions.md).
269350

351+
## Next step
352+
353+
If you are also deploying Microsoft Defender for Endpoint - EDR to your Windows based VDI VMs, please go thru the steps here: [Onboard non-persistent virtual desktop infrastructure (VDI) devices in Microsoft Defender XDR](/defender-endpoint/configure-endpoints-vdi)
354+
270355
## See also
271356

272357
- [Tech Community Blog: Configuring Microsoft Defender Antivirus for non-persistent VDI machines](https://techcommunity.microsoft.com/t5/microsoft-defender-for-endpoint/configuring-microsoft-defender-antivirus-for-non-persistent-vdi/ba-p/1489633)
@@ -278,6 +363,7 @@ If you're looking for information about Defender for Endpoint on non-Windows pla
278363
- [Microsoft Defender for Endpoint on Mac](microsoft-defender-endpoint-mac.md)
279364
- [Microsoft Defender for Endpoint on Linux](microsoft-defender-endpoint-linux.md)
280365
- [Configure Defender for Endpoint on Android features](android-configure.md)
366+
281367
- [Configure Microsoft Defender for Endpoint on iOS features](ios-configure-features.md)
282368

283369
[!INCLUDE [Microsoft Defender for Endpoint Tech Community](../includes/defender-mde-techcommunity.md)]

0 commit comments

Comments
 (0)