Skip to content

Commit 119c7a3

Browse files
Merge pull request #3584 from YongRhee-MSFT/docs-editor/schedule-antivirus-scans-power-1745624973
Update schedule-antivirus-scans-powershell.md
2 parents 8d77bdb + 35d6f94 commit 119c7a3

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

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

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ms.localizationpriority: medium
66
author: emmwalshh
77
ms.author: ewalsh
88
ms.custom: nextgen
9-
ms.date: 04/23/2025
9+
ms.date: 04/29/2025
1010
ms.reviewer: pauhijbr, ksarens
1111
manager: deniseb
1212
ms.subservice: ngp
@@ -30,7 +30,7 @@ search.appverid: met150
3030
- Windows
3131
- Windows Server
3232

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).
3434

3535
## Use PowerShell cmdlets for scheduling daily quick scans
3636

@@ -46,7 +46,6 @@ Set-MpPreference -ScanScheduleQuickScanTime
4646
4747
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).
4848

49-
5049
```powershell
5150
Set-MpPreference -ScanScheduleQuickScanTime 720
5251
```
@@ -58,9 +57,12 @@ Use the following cmdlets:
5857
```PowerShell
5958
Set-MpPreference -ScanParameters
6059
Set-MpPreference -ScanScheduleDay
61-
Set-MpPreference -ScanScheduleTime
60+
Set-MpPreference -ScanScheduleOffset
6261
```
6362

63+
> [!TIP]
64+
> We recommend using the ScanScheduleOffset instead of ScanScheduleTime.
65+
6466
-ScanParameters, specifies the scan type to use during a scheduled scan. The acceptable values for this parameter are:
6567

6668
1: Quick scan
@@ -91,17 +93,16 @@ Specifies the day of the week on which to perform a scheduled scan. Alternativel
9193

9294
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.
9395

94-
-ScanScheduleTime
96+
-ScanScheduleOffset
9597

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.
9799

98100
For example, setting the weekly scheduled scan for a quick scan, that runs every Wednesday at 12:00 PM (lunch time)
99101

100-
101102
```powershell
102103
Set-MpPreference -ScanParameters 1
103104
Set-MpPreference -ScanScheduleDay 4
104-
Set-MpPreference -ScanScheduleTime 720
105+
Set-MpPreference -ScanScheduleOffset 720
105106
```
106107

107108
> [!TIP]
@@ -124,8 +125,6 @@ Set-MpPreference -ScanScheduleTime 720
124125

125126
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/).
126127

127-
128-
129128
## PowerShell cmdlets for scheduling scans to complete remediation
130129

131130
Use the following cmdlets:

0 commit comments

Comments
 (0)