Windows

How to schedule Windows Defender Antivirus to scan on-demand in Windows

Microsoft Defender also referred to Windows Defender before Windows 10 November 2019 Update or Windows Defender Antivirus in Windows 10 Creators Update and later is an anti-malware component of Microsoft Windows.

Note: Windows 10 delivers comprehensive, built-in and ongoing security protections you can trust, including Windows Defender Antivirus, firewall, and more. By staying up to date, you’re assured of the latest features and protection at no additional cost. The antimalware offers real-time protection functionality to detect and remove malware proactively, and you even get the option to start a scan manually as shown below.

Other types of scan that can be performed are as follow:
– Simply click on the “Scan options” a shown above.

You can also schedule a Windows Defender Antivirus scan at your preferred day of the month and time to create an extra layer of security. However, it’s not an option that you can enable through the Windows Security Application. But can be configured using the Windows Task Scheduler. For similar articles on Windows Task Scheduler, see https://techdirectarchive.com/?s=task+scheduler

In order to configure Windows Defender to run whenever required, follow these steps.
– Search and launch the Task Scheduler Tool as shown below or
– From the Start menu,
– Select Administrative Tools 
– Double click on Task Scheduler

This will open up the task scheduler tool. For me, I do not need to create a folder to house my task, so I will create a new task on the fly as shown below and populate it with the necessary information.

– Right-click on Task Scheduled Library or Under Actions, select “New Task
This will open up the create task dialog window as shown below.
– On the General Tab, Enter the Task Name
– Enter a description for others to understand what you are doing
– Select “Run whether user is logged on or not”
If this is not selected and the first option is used, the script may not run when a user does not login. We have had a similar issue in the past.
– Ensure to run with the highest privilege

Navigate to the Trigger Tab as shown below
– Click on New, This will open a window where the trigger can be defined.

Since I would like the update to run every Friday after work time, the following triggers highlighted in red will be configured.

When you are done creating the trigger, The following configured trigger will be displayed as shown below and then click on ok.

– Next. click on the Action tab
Use the “Action” drop-down menu and select the Start a program option.
Under the “Settings” section, in the “Program/script” field, specify the path for the Windows Defender Antivirus program (It is safer to browser to the location and when done click on ok as shown below).

"C:\Program Files\Windows Defender\MpCmdRun.exe"

Note: The above argument performs a full malware scan, but you can use the -Scan -ScanType 1 argument to specify a quick scan, or you can use the -Scan -ScanType 3 -File PATH/TO/FILE/OR/FOLDER to scan a particular location or file

Next, click on the condition tab as shown above.
– For me, these settings are not applicable, but below is a screenshot of how it looks like 🙂

Next, navigate to the settings tab and the following settings are applicable to me in my test laboratory.
– Click on “OK” as shown below.
This will prompt you to enter your password as shown below

Hence forth, the Windows Defender Antivirus (scheduled task) will run automatically on demand. To view the configured task, click on the “Task Scheduler Library” and search for your configured task as shown below.

To test this task, since the date we have configured this task to run is still in the future, we will manually run the task as shown below.
– Right-click on the task and
– Click on run

For more information on how to run, edit, and delete a task using Task Scheduler GUI (taskschd.msc), see the following link https://techdirectarchive.com/2020/04/02/how-to-run-edit-and-delete-a-task-using-task-scheduler-gui-taskschd-msc/

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x