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
Copy file name to clipboardExpand all lines: defender-endpoint/schedule-antivirus-scans-powershell.md
+9-10Lines changed: 9 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ ms.localizationpriority: medium
6
6
author: emmwalshh
7
7
ms.author: ewalsh
8
8
ms.custom: nextgen
9
-
ms.date: 04/23/2025
9
+
ms.date: 04/29/2025
10
10
ms.reviewer: pauhijbr, ksarens
11
11
manager: deniseb
12
12
ms.subservice: ngp
@@ -30,7 +30,7 @@ search.appverid: met150
30
30
- Windows
31
31
- Windows Server
32
32
33
-
This article describes how to configure scheduled scans using PowerShell cmdlets. To learn more about scheduling scans and about scan types, see [Configure scheduled quick or full Microsoft Defender Antivirus scans](schedule-antivirus-scans.md).
33
+
This article describes how to configure scheduled scans using PowerShell cmdlets. To learn more about scheduling scans and about scan types, see [Configure scheduled quick or full Microsoft Defender Antivirus scans](schedule-antivirus-scans.md).
34
34
35
35
## Use PowerShell cmdlets for scheduling daily quick scans
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).
48
48
49
-
50
49
```powershell
51
50
Set-MpPreference -ScanScheduleQuickScanTime 720
52
51
```
@@ -58,9 +57,12 @@ Use the following cmdlets:
58
57
```PowerShell
59
58
Set-MpPreference -ScanParameters
60
59
Set-MpPreference -ScanScheduleDay
61
-
Set-MpPreference -ScanScheduleTime
60
+
Set-MpPreference -ScanScheduleOffset
62
61
```
63
62
63
+
> [!TIP]
64
+
> We recommend using the ScanScheduleOffset instead of ScanScheduleTime.
65
+
64
66
-ScanParameters, specifies the scan type to use during a scheduled scan. The acceptable values for this parameter are:
65
67
66
68
1: Quick scan
@@ -91,17 +93,16 @@ Specifies the day of the week on which to perform a scheduled scan. Alternativel
91
93
92
94
The default value is 8, never. If you specify a value of 8 or don't specify a value, Windows Defender doesn't perform scheduled scans.
93
95
94
-
-ScanScheduleTime
96
+
-ScanScheduleOffset
95
97
96
-
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).
98
+
This setting allows you to configure the number of minutes after midnight to perform a scheduled scan. The local time on the endpoint is used to determine when the scan occurs. If you enable this setting, the scheduled scan runs at the specified time. If you disable or don't enable this setting, the scheduled scan will default to running two hours (120 minutes) after midnight.
97
99
98
100
For example, setting the weekly scheduled scan for a quick scan, that runs every Wednesday at 12:00 PM (lunch time)
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/).
126
127
127
-
128
-
129
128
## PowerShell cmdlets for scheduling scans to complete remediation
0 commit comments