How to use command prompt to manage windows defender antivirus

command prompt windows defender - ugtechmag.com - 2
- Advertisement -

This article talks about how to use the command prompt to manage windows defender antivirus. Command Prompt, well known as cmd.exe or cmd, is the default command-line interpreter for the OS/2, eComStation, ArcaOS, Microsoft Windows (Windows NT family and Windows CE family), and ReactOS operating systems.

- Advertisement -

Command Prompt is one of the command-line interface programs used to execute commands in Windows operating systems. Some common Command Prompt commands you might have heard of include ping (in networking), netstat (tracking website usage), tracert, shutdown, and attrib, but there are many more. For this post, we specifically want to know exactly how to use the command prompt to manage windows defender antivirus. Stick around as we are discussing that next.

Related:
Telnet Commands Windows 10
How to uninstall windows 10 Apps using command prompt
How to see the websites your computer is secretly connecting to

use command prompt to manage windows defender antivirus
The Command Prompt can be used for various tasks that the user interface also does (Press cmd in the search bar of your windows and click Enter to access it)

How to use command prompt to manage windows defender antivirus:

The Windows Defender command line lets you do all the basic things like performing different types of scans, listing and restoring quarantined files, adding dynamic signatures, and removing or updating the virus definitions.

You can perform various functions in Microsoft Defender Antivirus using the dedicated command-line tool mpcmdrun.exe. This utility is useful when you want to automate Microsoft Defender Antivirus tasks. You can find the utility in %ProgramFiles%\Windows Defender\MpCmdRun.exe. Run it from a command prompt.

The MpCmdRun utility uses the following syntax:

MpCmdRun.exe [command] [-options]
Another example:
MpCmdRun.exe -Scan -ScanType 2

In this example, the MpCmdRun utility starts a whole antivirus scan on the device.

Commands

CommandDescription
-? or -hDisplays all available options for the MpCmdRun tool
-Scan [-ScanType [<value>]] [-File <path> [-DisableRemediation] [-BootSectorScan] [-CpuThrottling]] [-Timeout <days>] [-Cancel]Scans for malicious software. Values for ScanType are:0 Default, according to your configuration1 Quick scan2 Full scan3 File and directory custom scan.CPU throttling runs according to policy configurations
-Trace [-Grouping #] [-Level #]Starts diagnostic tracing
-GetFiles [-SupportLogLocation <path>]Collects support information. See ‘collecting diagnostic data’
-GetFilesDiagTrackSame as -GetFiles, but outputs to temporary DiagTrack folder
-RemoveDefinitions [-All]Restores the installed Security intelligence to a previous backup copy or to the original default set
-RemoveDefinitions [-DynamicSignatures]Removes only the dynamically downloaded Security intelligence
-RemoveDefinitions [-Engine]Restores the previous installed engine
-SignatureUpdate [-UNC \|-MMPC]Checks for new Security intelligence updates
-Restore [-ListAll \|[[-Name <name>] [-All] \|[-FilePath <filePath>]] [-Path <path>]]Restores or lists quarantined item(s)
-AddDynamicSignature [-Path]Loads dynamic Security intelligence
-ListAllDynamicSignaturesLists the loaded dynamic Security intelligence
-RemoveDynamicSignature [-SignatureSetID]Removes dynamic Security intelligence
-CheckExclusion -path <path>Checks whether a path is excluded
-ValidateMapsConnectionVerifies that your network can communicate with the Microsoft Defender Antivirus cloud service. This command will only work on Windows 10, version 1703 or higher.

Those are some of the command line commands to manage windows defender antivirus.