How to Use Microsoft Defender Antivirus from Command Prompt on Windows 10


Windows 10 Logo

Windows 10’s integrated Microsoft Defender antivirus—also recognised as Windows Defender—has a command-line interface. Fairly than employing the graphical Windows Security app, you can operate Windows 10’s designed-in antivirus from Command Prompt, PowerShell, or Home windows Terminal.

Operate a Quick Virus Scan

You can run a brief scan to search for viruses, malware, and other threats in some popular spots, such as the Home windows Registry and startup folders. This scan ordinarily only can take a couple of minutes to finish.

To use this scan, open up the “Start” menu, search for “Command Prompt,” correct-simply click the utility, and select “Run as administrator.”

Simply click “Yes” in the User Account Handle prompt.

In the Command Prompt window, variety the adhering to to make the Microsoft Defender Antivirus directory your existing functioning listing:

cd C:ProgramDataMicrosoftWindows DefenderPlatform4.18*

Be aware: If you make an additional listing your current functioning listing or shut and reopen the Command Prompt, make certain that you run the previously mentioned command ahead of applying any other Microsoft Defender Antivirus commands.

Then, enter the following command and press “Enter” to get started a rapid virus scan:

MpCmdRun -Scan -ScanType 1

You’ll see the live scan development on your screen.

Operate a Complete Virus Scan

A entire scan comprehensively checks all your computer system data files for viruses, malware, and other protection threats. Because this is a comprehensive scan, it tends to consider more time than the other scans.

You can operate a full scan making use of the subsequent command in the Command Prompt:

MpCmdRun -Scan -ScanType 2

Take note: If you want to quit a scan for some purpose, push Ctrl+C on your keyboard.

Complete a Personalized Virus Scan

You will want to use a customized scan when you have individual information or folders that you want to scan for viruses, malware, and other threats. You can use this to scan documents on your external storage as well, this sort of as your USB flash drives.

To use this, kind the adhering to command into the Command Prompt window and press “Enter.”

Make guaranteed to swap “PATH” with the path to the folder or file that you want to scan. If there are areas in your path, insert double quotes prior to and immediately after the path, like this: “C:UsersMaheshDesktopMy Files”

MpCmdRun -Scan -ScanType 3 -File Path

For occasion, if you desired to scan your desktop for any threats, you’d operate the following command, changing “MYNAME” with your username.

MpCmdRun -Scan -ScanType 3 -File C:UsersMYNAMEDesktop

Scan Your PC’s Boot Sector Documents

Your PC’s boot sector is where by all the essential data with regards to your computer’s boot-up is saved. This sector has the code that launches your operating system.

In some cases, specific viruses and other threats assault this boot sector. When this transpires, you experience difficulties booting up your pc. You could confront other problems as effectively.

Related: What to Do When Home windows Won’t Boot

If you consider your Personal computer is infected with a virus or malware, it’s truly worth running a boot sector scan to uncover and take out any suspicious content from this sector.

You can use the pursuing Microsoft Defender Antivirus command to operate a boot sector scan:

MpCmdRun -Scan -ScanType -BootSectorScan

Restore Quarantined Data files

When Microsoft Defender Antivirus finds a suspicious file, it moves that file to the Quarantine. This is a unique site to keep suspicious information, and your data files just cannot launch when they are below in the Quarantine.

If you imagine the antivirus has mistakenly moved a file to the Quarantine, you can use a command to restore that file again to its primary place.

To do this, very first, run the next command to perspective a checklist of all your quarantined documents:

MpCmdRun -Restore -ListAll

From the list, observe the title of the file that you want to restore. Then sort the next command, switch “MyApp.exe” with the title of the file you want to restore, and push “Enter.”

MpCmdRun -Restore -Name MyApp.exe

If you want to restore your file to a further folder, use the following command as an alternative. Make sure that you swap “PATH” with the route to your folder prior to you run the command.

Of course, substitute “MyApp.exe” with the title of the file that you want to restore.

MpCmdRun -Restore -Name MyApp.exe -FilePath Route

Update Microsoft Defender Antivirus

The Microsoft Defender Antivirus updates by itself often to make sure that it can discover more recent viruses and threats. Nonetheless, you can pressure it to discover and down load more recent updates at any time.

You can do this by running the pursuing command in the Command Prompt window:

MpCmdRun -SignatureUpdate

It’ll update the virus definitions devoid of any prompts.

Look at All Offered Microsoft Defender Antivirus Choices

In addition to the previously mentioned, there are many other command mixtures that you can use to make the most of this antivirus on your Home windows 10 Computer system.

To uncover all accessible commands and parameters, operate this command in the Command Prompt:

MpCmdRun -h

You’re now a pro when it will come to employing the Microsoft Defender Antivirus from the Command Prompt.

If you desire the graphical interface, check out our guideline on how to use the Microsoft Defender Antivirus, which points out all the graphical characteristics of this program.

Connected: How to Use the Created-in Windows Defender Antivirus on Home windows 10

Exit mobile version