You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|Enable full scan on battery power|Disabled/Not Configured (Default)|Set-MpPreference -EnableFullScanOnBatteryPower <Boolean><br>For example: Set-MpPreference -EnableFullScanOnBatteryPower $False|
49
49
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
51
56
52
57
Use the following cmdlets:
53
58
54
-
```PowerShell
55
-
Set-MpPreference -ScanParameters
56
-
Set-MpPreference -ScanScheduleDay
57
-
Set-MpPreference -ScanScheduleTime
58
-
Set-MpPreference -RandomizeScheduleTaskTimes
59
59
60
+
```powershell
61
+
Set-MpPreference -ScanScheduleQuickScanTime
60
62
```
61
63
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).
63
68
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
65
75
66
76
Use the following cmdlets:
67
77
68
78
```PowerShell
69
-
Set-MpPreference -ScanOnlyIfIdleEnabled
79
+
Set-MpPreference -ScanParameters
80
+
Set-MpPreference -ScanScheduleDay
81
+
Set-MpPreference -ScanScheduleTime
70
82
```
71
83
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:
73
85
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
76
87
77
-
## PowerShell cmdlets for scheduling scans to complete remediation
88
+
2: Full scan
78
89
79
-
Use the following cmdlets:
90
+
-ScanScheduleDay
80
91
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
84
125
```
85
126
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.
87
129
88
-
## PowerShell cmdlets for scheduling daily scans
130
+
## PowerShell cmdlets for scheduling scans to complete remediation
89
131
90
132
Use the following cmdlets:
91
133
92
134
```PowerShell
93
-
Set-MpPreference -ScanScheduleQuickScanTime
135
+
Set-MpPreference -RemediationScheduleDay
136
+
Set-MpPreference -RemediationScheduleTime
94
137
```
95
138
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
-
98
139
#### See also
99
140
100
141
[Troubleshoot Microsoft Defender Antivirus scan issues](/defender-endpoint/troubleshoot-mdav-scan-issues)
101
142
102
143
[Use PowerShell cmdlets to configure and manage Microsoft Defender Antivirus](/defender-endpoint/use-powershell-cmdlets-microsoft-defender-antivirus)
103
144
145
+
[Set the Powershell cmdlet to configure and manage Microsoft Defender Antivirus](/powershell/module/defender/set-mppreference?view=windowsserver2025-ps)
146
+
104
147
[Defender Antivirus specific Powershell functions](/powershell/module/defender/?view=windowsserver2025-ps)
0 commit comments