How to Schedule Microsoft Defender Scan in Windows 10/11

Microsoft Defender’s command-line utility MpCmdrun.exe is used for scheduling scans or updating the signatures using the command-line. This post tells you how to set up Microsoft Defender to scan the computer daily at a specified time using Task Scheduler and in Windows 10 or 11.

Note: Windows already includes the Automatic Maintenance feature, which runs many scheduled tasks, including Defender daily scan. However, the task runs only if the system is idle. Moreover, Automatic Maintenance stops running once it detects user activity in the system.

If you can leave the system idle for some time daily for Automatic Maintenance, you don’t have to schedule it manually. Creating a scheduled task manually runs the scan, regardless of whether your system is idle.

How to Schedule a Microsoft Defender Scan

Method 1: Create a Defender Scan Task Using SchTasks.exe

To schedule a daily Microsoft Defender scan, create a scheduled task using SchTasks.exe console tool using the following steps:

  1. Open a elevated Command Prompt. To do so, right-click Start and click Command Prompt (Admin).
  2. Type in the following command and press ENTER:
    schtasks /create /tn "Scan With Defender (Daily Quick Scan)" /sc DAILY /st 13:00 /ru SYSTEM /rl HIGHEST /tr "'C:\Program Files\Windows Defender\MpCmdRun.exe' -Scan -ScanType 1"

    windows defender scan schedule

    This creates a Microsoft Defender Scan task that runs daily, at 13:00 hours under SYSTEM user account with highest privileges. If you running it under SYSTEM account you wouldn’t see the Command Prompt window that the task runs in. To see the Command Prompt window (interactive), change SYSTEM to your user name (say, John, in place of SYSTEM).

  3. Type EXIT to close the Command Prompt window.

The above command was given as an example. You can alter the scan schedule time, frequency (DAILY, WEEKLY, MONTHLY) accordingly as per your requirements. For more information about Schtasks.exe command-line switches, see Schtasks.exe | Microsoft Docs article.

Method 2: Create a Defender Scan Task Using Task Scheduler

If you’d like to configure Microsoft Defender Scan schedule using Task Scheduler GUI, use these steps:

  1. Click Start, type Task Scheduler and click Task Scheduler from the list.
  2. From the Action menu, click Create Basic Task…
    windows defender scan schedule
  3. Assign a name for the task, and give an apt description for the custom task.
    windows defender scan schedule
  4. If you want to run the task once daily, click Daily, and click Next.
    windows defender scan schedule
  5. Set the time when you want to task to run, and click Next.
    windows defender scan schedule
  6. In the Action dialog, click Start a program, and click Next.
    windows defender scan schedule
  7. In the Program/Script text box, mention the full path of MpCmdRun.exe. In the “Add arguments” text box, type one of the following:
    -Scan -ScanType 1 (for Quick Scan)
    -Scan -ScanType 2 (for Full system Scan)



    Editor’s Note: SignatureUpdateAndQuickScan parameter does two things, just as the name implies: it updates the signatures and runs a Quick Scan. It is a hidden parameter that is not mentioned in the help or anywhere. Also, check out the post Using MpCmdRun.exe to Update Defender and Run a Quick Scan in One Go for more information.

    windows defender scan schedule

  8. Select the Open the Properties dialog for this task when I click Finish, and then click Finish.
    windows defender scan schedule
  9. Enable the check box for Run with highest privileges.
  10. Select Windows 10 in the Configure for: drop down list box.
  11. Exit the Task Scheduler.That’s it! You’ve now created a task that launches Microsoft Defender Scan on schedule. The task duly runs at the specified time. The Command Prompt window can be minimized.
    windows defender scan scheduleIf you use the SignatureUpdateAndQuickScan parameter, it updates the signatures and follows up with a Quick defender scan schedule

I hope that info helps.

One small request: If you liked this post, please share this?

One "tiny" share from you would seriously help a lot with the growth of this blog. Some great suggestions:
  • Pin it!
  • Share it to your favorite blog + Facebook, Reddit
  • Tweet it!
So thank you so much for your support. It won't take more than 10 seconds of your time. The share buttons are right below. :)

Ramesh Srinivasan is passionate about Microsoft technologies and he has been a consecutive ten-time recipient of the Microsoft Most Valuable Professional award in the Windows Shell/Desktop Experience category, from 2003 to 2012. He loves to troubleshoot and write about Windows. Ramesh founded in 2005.

1 thought on “How to Schedule Microsoft Defender Scan in Windows 10/11”

  1. I used method 2 to set mine up to run daily and it works good but I keep getting a black screen that pops up during the scan that says scan starting the black screen won’t go away till the scan is done…. Anyway to fix this so the black screen won’t show up during the scan


Leave a Comment