Skip to content

Commit 6e7c7cd

Browse files
committed
Learn Editor: Update schedule-antivirus-scans-powershell.md
1 parent c407081 commit 6e7c7cd

File tree

1 file changed

+65
-22
lines changed

1 file changed

+65
-22
lines changed

defender-endpoint/schedule-antivirus-scans-powershell.md

Lines changed: 65 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -47,60 +47,103 @@ This article describes how to configure scheduled scans using PowerShell cmdlets
4747
|Disable Catchup Full Scan|Disabled/Not Configured (Default)|Set-MpPreference -DisableCatchupFullScan <Boolean><br>For example: Set-MpPreference -DisableCatchupFullScan $True|
4848
|Enable full scan on battery power|Disabled/Not Configured (Default)|Set-MpPreference -EnableFullScanOnBatteryPower <Boolean><br>For example: Set-MpPreference -EnableFullScanOnBatteryPower $False|
4949

50-
## Use PowerShell cmdlets to schedule scans
50+
For more information, see [Use PowerShell cmdlets to configure and run Microsoft Defender Antivirus](/editor/MicrosoftDocs/defender-docs-pr/defender-endpoint%2Fschedule-antivirus-scans-powershell.md/main/bcb7536e-34b9-8af7-5381-96c46d108a91/use-powershell-cmdlets-microsoft-defender-antivirus.md) and [Defender Antivirus cmdlets](/powershell/module/defender/).
51+
52+
> [!NOTE]
53+
> When you schedule scans for times when endpoints aren't in use, scans don't honor the CPU throttling configuration and will take full advantage of the resources available to complete the scan as fast as possible.
54+
55+
## Use PowerShell cmdlets for scheduling daily quick scans
5156

5257
Use the following cmdlets:
5358

54-
```PowerShell
55-
Set-MpPreference -ScanParameters
56-
Set-MpPreference -ScanScheduleDay
57-
Set-MpPreference -ScanScheduleTime
58-
Set-MpPreference -RandomizeScheduleTaskTimes
5959

60+
```powershell
61+
Set-MpPreference -ScanScheduleQuickScanTime
6062
```
6163

62-
For more information, see [Use PowerShell cmdlets to configure and run Microsoft Defender Antivirus](use-powershell-cmdlets-microsoft-defender-antivirus.md) and [Defender Antivirus cmdlets](/powershell/module/defender/) for more information on how to use PowerShell with Microsoft Defender Antivirus.
64+
> [!NOTE]
65+
> The time value is represented as the number of minutes past midnight (00:00 or 12:00 a.m.), For example, 120 is equivalent to 2:00 AM. The schedule is based on local time on the device where the scan is executing.
66+
67+
For example, to set a daily quick scan run on the Windows clients at 12:00 PM. (720). In this example, we use lunch time, since many devices nowadays are turned off after-hours (For example, laptops and/or tablets).
6368

64-
## PowerShell cmdlets for scheduling scans when an endpoint isn't in use
69+
70+
```powershell
71+
Set-MpPreference -ScanScheduleQuickScanTime 720
72+
```
73+
74+
## Use PowerShell cmdlets to scheduling weekly quick or full scans
6575

6676
Use the following cmdlets:
6777

6878
```PowerShell
69-
Set-MpPreference -ScanOnlyIfIdleEnabled
79+
Set-MpPreference -ScanParameters
80+
Set-MpPreference -ScanScheduleDay
81+
Set-MpPreference -ScanScheduleTime
7082
```
7183

72-
For more information, see [Use PowerShell cmdlets to configure and run Microsoft Defender Antivirus](use-powershell-cmdlets-microsoft-defender-antivirus.md) and [Defender Antivirus cmdlets](/powershell/module/defender/).
84+
-ScanParameters, specifies the scan type to use during a scheduled scan. The acceptable values for this parameter are:
7385

74-
> [!NOTE]
75-
> When you schedule scans for times when endpoints aren't in use, scans don't honor the CPU throttling configuration and will take full advantage of the resources available to complete the scan as fast as possible.
86+
1: Quick scan
7687

77-
## PowerShell cmdlets for scheduling scans to complete remediation
88+
2: Full scan
7889

79-
Use the following cmdlets:
90+
-ScanScheduleDay
8091

81-
```PowerShell
82-
Set-MpPreference -RemediationScheduleDay
83-
Set-MpPreference -RemediationScheduleTime
92+
Specifies the day of the week on which to perform a scheduled scan. Alternatively, specify everyday for a scheduled scan or never. The acceptable values for this parameter are:
93+
94+
0: Everyday
95+
96+
1: Sunday
97+
98+
2: Monday
99+
100+
3: Tuesday
101+
102+
4: Wednesday
103+
104+
5: Thursday
105+
106+
6: Friday
107+
108+
7: Saturday
109+
110+
8: Never
111+
112+
The default value is 8, never. If you specify a value of 8 or do not specify a value, Windows Defender does not perform scheduled scans.
113+
114+
-ScanScheduleTime
115+
116+
Specifies the time of day to run a scheduled scan. The time refers to the local time on the computer. Specify the number of minutes after midnight (for example, enter 60 for AM). This parameter has a default time of two hours after midnight (2 AM).
117+
118+
For example, setting the weekly scheduled scan for a quick scan, that runs every Wednesday at 12:00 PM (lunch time)
119+
120+
121+
```powershell
122+
Set-MpPreference -ScanParameters 1
123+
Set-MpPreference -ScanScheduleDay 4
124+
Set-MpPreference -ScanScheduleTime 720
84125
```
85126

86-
See [Use PowerShell cmdlets to configure and run Microsoft Defender Antivirus](use-powershell-cmdlets-microsoft-defender-antivirus.md) and [Defender Antivirus cmdlets](/powershell/module/defender/) for more information on how to use PowerShell with Microsoft Defender Antivirus.
127+
> [!TIP]
128+
> We recommend setting the scheduled scans for a quick scan with Real-Time Protection enabled, Cloud Protection enabled and having the network connectivity to the Cloud Protection backend.
87129
88-
## PowerShell cmdlets for scheduling daily scans
130+
## PowerShell cmdlets for scheduling scans to complete remediation
89131

90132
Use the following cmdlets:
91133

92134
```PowerShell
93-
Set-MpPreference -ScanScheduleQuickScanTime
135+
Set-MpPreference -RemediationScheduleDay
136+
Set-MpPreference -RemediationScheduleTime
94137
```
95138

96-
For more information about how to use PowerShell with Microsoft Defender Antivirus, see [Use PowerShell cmdlets to configure and run Microsoft Defender Antivirus](use-powershell-cmdlets-microsoft-defender-antivirus.md) and [Defender Antivirus cmdlets](/powershell/module/defender/).
97-
98139
#### See also
99140

100141
[Troubleshoot Microsoft Defender Antivirus scan issues](/defender-endpoint/troubleshoot-mdav-scan-issues)
101142

102143
[Use PowerShell cmdlets to configure and manage Microsoft Defender Antivirus](/defender-endpoint/use-powershell-cmdlets-microsoft-defender-antivirus)
103144

145+
[Set the Powershell cmdlet to configure and manage Microsoft Defender Antivirus](/powershell/module/defender/set-mppreference?view=windowsserver2025-ps)
146+
104147
[Defender Antivirus specific Powershell functions](/powershell/module/defender/?view=windowsserver2025-ps)
105148

106149
> [!TIP]

0 commit comments

Comments
 (0)