How to use Windows Defender from Command Prompt to execute various tasks? Well, this post of MiniTool would tell you how to do that in detail.
What Can Windows Defender Do
Windows Defender is also referred to as Windows Security, which is an embedded utility in Windows systems. It usually runs silently in the background and offers you real-time protection. What does it do? It scans, detects, and removes viruses, spyware, and malware.
As shown in the picture below, Windows Defender can provide you with virus & threat protection, account protection, Firewall & network protection, app & browser control, and device (performance & health) protection.
If you are locked out of its graphics user interface or don’t want to launch it, you can directly use Windows Defender from Command Prompt. This post shows you how to use Windows Defender from Command Prompt to execute different operations.
Before starting any operations, run Command Prompt as administrator. Here are the detailed steps for doing that.
Step 1: Type cmd in the search box.
Step 2: Click Run as administrator in the right panel. Alternatively, you can also right-click on Command Prompt and click Run as administrator.
Use Command Lines to Perform a Quick Scan
To find viruses, malware, and other threats in some common places, you can run a quick scan. As its name implies, the quick scan process will complete in a few minutes. If you want to use Windows Defender from Command Prompt to perform a quick scan, type the command below after running Command Prompt as administrator and hit Enter.
“%ProgramFiles%Windows DefenderMpCmdRun.exe” -Scan -ScanType 1
Use Command Lines to Perform a Full Scan
If you would like to conduct an in-depth scan on your PC, you need to perform a full scan. Compared with quick the quick scan, a full scan needs more time. To execute a full scan via command lines, type the following command in the opened prompt window and press Enter.
“%ProgramFiles%Windows DefenderMpCmdRun.exe” -Scan -ScanType 2
Use Command Lines to Perform a Custom Scan
To scan specific files or folders for viruses and other threats, you should perform a custom scan. This sort of scan is also available for external storage devices like USB flash drives and external hard drives. The following command shows you how to use Microsoft Defender Antivirus from Command Prompt to conduct a custom scan.
“%ProgramFiles%Windows DefenderMpCmdRun.exe” -Scan -ScanType 3 -File “D:FolderPath”
Use Command Lines to Scan for Infected Boot Sectors
Boot sectors in the computer store all the important information related to your PC’s boot-up. However, some viruses and threats may attack the boot sector. Fortunately, you run Windows Defender from command line to scan and remove threats with boot sectors.
“%ProgramFiles%Windows DefenderMpCmdRun.exe” -Scan -ScanType -BootSectorScan
Run Command Lines to Update Windows Defender Antivirus
You can also use Windows Defender from Command Prompt to update Microsoft Defender Antivirus. For that, you simply need to type the command below and press Enter.
“%ProgramFiles%Windows DefenderMpCmdRun.exe” -SignatureUpdate
Run Commands Lines to Restore Quarantined Files
Files would be moved to Quarantine if Microsoft Defender Antivirus thinks it’s suspicious. If you need these files, you can restore them via the command lines of Windows Defender.
“%ProgramFiles%Windows DefenderMpCmdRun.exe” -Restore -ListAll
Find the file that you want to restore from the list, and then type the command below and press Enter. You should replace FileName with the exact file name you want to restore.
“%ProgramFiles%Windows DefenderMpCmdRun.exe” -Restore -Name “FileName”
How to run Windows Defender from command line? How to use Microsoft Defender Antivirus from Command Prompt? This post has shown you the answers. Read it now!