{"id":211198,"date":"2021-03-25T16:30:32","date_gmt":"2021-03-25T13:30:32","guid":{"rendered":"https:\/\/en.buradabiliyorum.com\/how-to-use-microsoft-defender-antivirus-from-command-prompt-on-windows-10\/"},"modified":"2021-03-25T16:30:32","modified_gmt":"2021-03-25T13:30:32","slug":"how-to-use-microsoft-defender-antivirus-from-command-prompt-on-windows-10","status":"publish","type":"post","link":"https:\/\/buradabiliyorum.com\/en\/how-to-use-microsoft-defender-antivirus-from-command-prompt-on-windows-10\/","title":{"rendered":"#How to Use Microsoft Defender Antivirus from Command Prompt on Windows 10"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_84 counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-6a2ba70e52c56\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #dd3333;color:#dd3333\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #dd3333;color:#dd3333\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-6a2ba70e52c56\" checked aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-use-microsoft-defender-antivirus-from-command-prompt-on-windows-10\/#Run_a_Quick_Virus_Scan\" >Run a Quick Virus Scan<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-use-microsoft-defender-antivirus-from-command-prompt-on-windows-10\/#Run_a_Full_Virus_Scan\" >Run a Full Virus Scan<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-use-microsoft-defender-antivirus-from-command-prompt-on-windows-10\/#Perform_a_Custom_Virus_Scan\" >Perform a Custom Virus Scan<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-use-microsoft-defender-antivirus-from-command-prompt-on-windows-10\/#Scan_Your_PCs_Boot_Sector_Files\" >Scan Your PC\u2019s Boot Sector Files<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-use-microsoft-defender-antivirus-from-command-prompt-on-windows-10\/#Restore_Quarantined_Files\" >Restore Quarantined Files<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-use-microsoft-defender-antivirus-from-command-prompt-on-windows-10\/#Update_Microsoft_Defender_Antivirus\" >Update Microsoft Defender Antivirus<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-use-microsoft-defender-antivirus-from-command-prompt-on-windows-10\/#View_All_Available_Microsoft_Defender_Antivirus_Options\" >View All Available Microsoft Defender Antivirus Options<\/a><\/li><\/ul><\/nav><\/div>\n<p><strong>&#8220;#How to Use Microsoft Defender Antivirus from Command Prompt on Windows 10&#8221;<\/strong><\/p>\n<div>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-679121\" src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2020\/06\/windows_10_hero_3.jpg\" alt=\"Windows 10 Logo\" width=\"650\" height=\"300\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>Windows 10\u2019s included Microsoft Defender antivirus\u2014also known as Windows Defender\u2014has a command-line interface. Rather than using the graphical Windows Security <a href=\"https:\/\/buradabiliyorum.com\/en\/category\/download-scripts-themes-apps\/\" data-internallinksmanager029f6b8e52c=\"9\" title=\"Download Scripts &amp; Themes &amp; Apps\" target=\"_blank\" rel=\"noopener\">app<\/a>, you can run Windows 10\u2019s built-in antivirus from Command Prompt, PowerShell, or Windows Terminal.<\/p>\n<h2 role=\"heading\" aria-level=\"2\"><span class=\"ez-toc-section\" id=\"Run_a_Quick_Virus_Scan\"><\/span>Run a Quick Virus Scan<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>You can run a quick scan to look for viruses, malware, and other threats in some common places, such as the Windows Registry and startup folders. This scan usually only takes a few minutes to finish.<\/p>\n<p>To use this scan, open the \u201cStart\u201d menu, search for \u201cCommand Prompt,\u201d right-click the utility, and select \u201cRun as administrator.\u201d<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-717574\" src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/03\/run-cmd-admin.png\" alt=\"Run the Command Prompt as admin\" width=\"650\" height=\"282\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>Click \u201cYes\u201d in the User Account Control prompt.<\/p>\n<p>In the Command Prompt window, type the following to make the Microsoft Defender Antivirus directory your current working directory:<\/p>\n<pre>cd C:ProgramDataMicrosoftWindows DefenderPlatform4.18*<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-717575\" src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/03\/cd-command.png\" alt=\"Go to the Microsoft Defender Antivirus folder\" width=\"650\" height=\"201\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<blockquote class=\"admonishment_note\"><p><strong>Note:<\/strong> If you make another directory your current working directory or close and reopen the Command Prompt, make sure that you run the above command before using any other Microsoft Defender Antivirus commands.<\/p><\/blockquote>\n<p>Then, enter the following command and press \u201cEnter\u201d to start a quick virus scan:<\/p>\n<pre>MpCmdRun -Scan -ScanType 1<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-717576 alignnone\" src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/03\/run-quick-scan.png\" alt=\"Run a quick virus scan\" width=\"650\" height=\"185\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>You\u2019ll\u00a0see the live scan progress on your screen.<\/p>\n<h2 role=\"heading\" aria-level=\"2\"><span class=\"ez-toc-section\" id=\"Run_a_Full_Virus_Scan\"><\/span>Run a Full Virus Scan<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>A full scan thoroughly checks all your computer files for viruses, malware, and other security threats. Since this is a comprehensive scan, it tends to take longer than the other scans.<\/p>\n<p>You can run a full scan using the following command in the Command Prompt:<\/p>\n<pre>MpCmdRun -Scan -ScanType 2<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-717577\" src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/03\/run-full-scan.png\" alt=\"Run a full virus scan\" width=\"650\" height=\"174\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<blockquote class=\"admonishment_note\"><p><strong>Note:<\/strong> If you need to stop a scan for some reason, press Ctrl+C on your keyboard.<\/p><\/blockquote>\n<h2 role=\"heading\" aria-level=\"2\"><span class=\"ez-toc-section\" id=\"Perform_a_Custom_Virus_Scan\"><\/span>Perform a Custom Virus Scan<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>You\u2019ll want to use a custom scan when you have particular files or folders that you want to scan for viruses, malware, and other threats. You can use this to scan files on your external storage as well, such as your USB flash drives.<\/p>\n<p>To use this, type the following command into the Command Prompt window and press \u201cEnter.\u201d<\/p>\n<p>Make sure to replace \u201cPATH\u201d with the path to the folder or file that you want to scan. If there are spaces in your path, add double quotes before and after the path, like this:\u00a0\u201cC:UsersMaheshDesktopMy Files\u201d<\/p>\n<pre>MpCmdRun -Scan -ScanType 3 -File PATH<\/pre>\n<p>For instance, if you wanted to scan your desktop for any threats, you\u2019d run the following command, replacing \u201cMYNAME\u201d with your username.<\/p>\n<pre>MpCmdRun -Scan -ScanType 3 -File C:UsersMYNAMEDesktop<\/pre>\n<h2 role=\"heading\" aria-level=\"2\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-717578\" src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/03\/run-custom-scan.png\" alt=\"Run a custom virus scan\" width=\"650\" height=\"139\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/h2>\n<h2 role=\"heading\" aria-level=\"2\"><span class=\"ez-toc-section\" id=\"Scan_Your_PCs_Boot_Sector_Files\"><\/span>Scan Your PC\u2019s Boot Sector Files<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Your PC\u2019s boot sector is where all the essential information regarding your computer\u2019s boot-up is stored. This sector contains the code that launches your operating system.<\/p>\n<p>Sometimes, certain viruses and other threats attack this boot sector. When this happens, you experience issues booting up your computer. You could face other issues as well.<\/p>\n<p><strong>RELATED:<\/strong> <strong><em>What to Do When Windows Won&#8217;t Boot<\/em><\/strong><\/p>\n<p>If you believe your PC is infected with a virus or malware, it\u2019s worth running a boot sector scan to find and remove any suspicious content from this sector.<\/p>\n<p>You can use the following Microsoft Defender Antivirus command to run a boot sector scan:<\/p>\n<pre>MpCmdRun -Scan -ScanType -BootSectorScan<\/pre>\n<h2 role=\"heading\" aria-level=\"2\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-717579\" src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/03\/run-boot-sector-scan.png\" alt=\"Run a boot sector scan\" width=\"650\" height=\"142\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/h2>\n<h2 role=\"heading\" aria-level=\"2\"><span class=\"ez-toc-section\" id=\"Restore_Quarantined_Files\"><\/span>Restore Quarantined Files<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>When Microsoft Defender Antivirus finds a suspicious file, it moves that file to the Quarantine. This is a special location to store suspicious files, and your files can\u2019t launch when they\u2019re here in the Quarantine.<\/p>\n<p>If you believe the antivirus has mistakenly moved a file to the Quarantine, you can use a command to restore that file back to its original location.<\/p>\n<p>To do this, first, run the following command to view a list of all your quarantined files:<\/p>\n<pre>MpCmdRun -Restore -ListAll<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-717580\" src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/03\/view-quarantined-files.png\" alt=\"View quarantined files\" width=\"650\" height=\"162\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>From the list, note the name of the file that you want to restore. Then type the following command, replace \u201cMyApp.exe\u201d with the name of the file you want to restore, and press \u201cEnter.\u201d<\/p>\n<pre>MpCmdRun -Restore -Name MyApp.exe<\/pre>\n<p>If you want to restore your file to another folder, use the following command instead. Make sure that you replace \u201cPATH\u201d with the path to your folder before you run the command.<\/p>\n<p>Of course, replace \u201cMyApp.exe\u201d with the name of the file that you want to restore.<\/p>\n<pre>MpCmdRun -Restore -Name MyApp.exe -FilePath PATH<\/pre>\n<h2 role=\"heading\" aria-level=\"2\"><span class=\"ez-toc-section\" id=\"Update_Microsoft_Defender_Antivirus\"><\/span>Update Microsoft Defender Antivirus<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>The Microsoft Defender Antivirus updates itself regularly to ensure that it can find newer viruses and threats. However, you can force it to find and download newer updates at any time.<\/p>\n<p>You can do this by running the following command in the Command Prompt window:<\/p>\n<pre>MpCmdRun -SignatureUpdate<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-717581\" src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/03\/update-virus-definitions.png\" alt=\"Update the Microsoft Defender Antivirus\" width=\"650\" height=\"167\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>It\u2019ll update the virus definitions without any prompts.<\/p>\n<h2 role=\"heading\" aria-level=\"2\"><span class=\"ez-toc-section\" id=\"View_All_Available_Microsoft_Defender_Antivirus_Options\"><\/span>View All Available Microsoft Defender Antivirus Options<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>In addition to the above, there are many other command combinations that you can use to make the most of this antivirus on your Windows 10 PC.<\/p>\n<p>To find all available commands and parameters, run this command in the Command Prompt:<\/p>\n<pre>MpCmdRun -h<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-717582\" src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/03\/view-all-commands.png\" alt=\"View all the Microsoft Defender Antivirus commands\" width=\"650\" height=\"322\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>You\u2019re now a pro when it comes to using the Microsoft Defender Antivirus from the Command Prompt.<\/p>\n<p>If you prefer the graphical interface, check out our guide on how to use the Microsoft Defender Antivirus, which explains all the graphical features of this program.<\/p>\n<p><strong>RELATED:<\/strong> <strong><em>How to Use the Built-in Windows Defender Antivirus on Windows 10<\/em><\/strong><\/p>\n<\/div>\n<p><script>\n setTimeout(function(){\n  !function(f,b,e,v,n,t,s)\n  {if(f.fbq)return;n=f.fbq=function(){n.callMethod?\n  n.callMethod.apply(n,arguments):n.queue.push(arguments)};\n  if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';\n  n.queue=[];t=b.createElement(e);t.async=!0;\n  t.src=v;s=b.getElementsByTagName(e)[0];\n  s.parentNode.insertBefore(t,s) } (window, document,'script',\n  'https:\/\/connect.facebook.net\/en_US\/fbevents.js');\n   fbq('init', '335401813750447');\n   fbq('track', 'PageView');\n  },3000);\n<\/script><\/p>\n<blockquote><p><strong><span style=\"color: #ff6600;\">If you liked the article, do not forget to share it with your friends. Follow us on\u00a0<span style=\"color: #ff0000;\"><a style=\"color: #ff0000;\" href=\"https:\/\/news.google.com\/publications\/CAAqBwgKMLG0nwswvr63Aw\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Google News<\/a><\/span>\u00a0too, click on the star and choose us from your favorites.<\/span><\/strong><\/p><\/blockquote>\n<blockquote>\n<p style=\"text-align: center;\">For forums sites go to <span style=\"color: #ff9900;\"><a style=\"color: #ff9900;\" href=\"https:\/\/forum.buradabiliyorum.com\/\" target=\"_blank\" rel=\"noopener\">Forum.BuradaBiliyorum.Com<\/a><\/span><\/strong>\n<\/p><\/blockquote>\n<blockquote>\n<p style=\"text-align: center;\"><strong>If you want to read more like this article, you can visit our <span style=\"color: #ff9900;\"><a style=\"color: #ff9900;\" href=\"https:\/\/en.buradabiliyorum.com\/technology\/\" target=\"_blank\" rel=\"noopener\">Technology category.<\/a><\/span><\/strong><\/p>\n<\/blockquote>\n<p><span style=\"color: black;\"><a style=\"color: #ff9900;\" href=\"https:\/\/www.howtogeek.com\/717570\/how-to-use-microsoft-defender-antivirus-from-command-prompt-on-windows-10\/\" target=\"_blank\" rel=\"noopener\">Source<\/a><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#8220;#How to Use Microsoft Defender Antivirus from Command Prompt on Windows 10&#8221; Windows 10\u2019s included Microsoft Defender antivirus\u2014also known as Windows Defender\u2014has a command-line interface. Rather than using the graphical Windows Security app, you can run Windows 10\u2019s built-in antivirus from Command Prompt, PowerShell, or Windows Terminal. Run a Quick Virus Scan You can run&#8230;<\/p>\n","protected":false},"author":1,"featured_media":211199,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"fifu_image_url":"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2020\/06\/windows_10_hero_3.jpg?height=200p&trim=2,2,2,2","fifu_image_alt":"","footnotes":""},"categories":[18],"tags":[],"class_list":["post-211198","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technology"],"_links":{"self":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/posts\/211198","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/comments?post=211198"}],"version-history":[{"count":0,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/posts\/211198\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/media\/211199"}],"wp:attachment":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/media?parent=211198"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/categories?post=211198"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/tags?post=211198"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}