Site search

Windows Defender on-demand scan in Windows 8 and 8.1

By , logo. Last updated: 2020-10-22

How to run an on-demand scan with Windows Defender in Windows 8 and 8.1

Windows Defender in Windows 8 and 8.1 has no built-in support for right-click menus (aka context menus) and therefore you cannot easily scan just a single file or folder (adding this method to the Send To menu is described later in the article). You can still run quick, full, and custom scans.

Windows 10 Creators Update (April 2017) and newer replace the Windows Defender desktop program with Windows Defender Security Center modern app. Please see the Windows Defender Security Center on-demand scan tutorial for this.

To launch Windows Defender, open the Start screen or Start menu, type "defender" and click the result.
Touch screen users should reveal the Charms bar by swiping in from the right edge of the screen and then tap/touch Search.
Windows 8.1, Search Everywhere. To run Windows Defender, type 'defender' into Search box and click the result.

As Windows Defender updates its virus and spyware definitions only once a day by default, it is recommended to open the Update tab and click Update first.
Those who have already configured more frequent signature updates can skip this step.
Windows 8, Windows Defender, Update tab. To check for latest virus and spyware definitions, click Update.

Running a monthly full anti-virus scan with Windows Defender in Windows 8 and 8.1

A full scan should be performed once every month to ensure that there are no viruses and malware hiding somewhere deep in your computer. You should also run a full virus scan when the status of the Windows Defender in Action Center remains red after a quick scan.

Make sure the Home tab is open. In the right part of the window click Full under Scan options. Then click Scan now.
Windows 8, Windows Defender, Home tab. To run a thorough virus and malware scan, select 'Full' from Scan options. Then click 'Scan now'.

Wait until the scan is complete (this might take several hours). Well, you can do some work if you have a fast computer, or you can call your friends or do some exercise.

If everything's fine and the program's status remains green, you can safely close the Windows Defender window after the scan is complete.

Windows Defender lets you know in case some malware has been detected - a yellow triangle with a black exclamation mark appears with the warning. You must still wait until the scan completes to see details on the detected items.
Windows 8, Windows Defender is scanning your PC. If malware has been detected, a yellow triangle with black exclamation mark appears along with the 'Preliminary scan results show that malicious or potentially unwanted software might exist on your system' message.

If potential threats have been detected, Windows Defender will turn its status to red (for severe and high-risk malware) or yellow-orange and present a big button named Clean PC after the scan is complete. Click that button to apply default actions right away.
You can also review detected items and select actions for these using the Show details link under the big red button.
Windows 8, Windows Defender detected potential threats on your PC. Click the red 'Clean PC' button. Windows 8, Windows Defender detected potential threats on your PC. To review detected items before cleaning, click the 'Show details' link.

If you chose to review all threats, a Windows Defender Alert window pops up. Here you can set an action for each detection or use the Show details button to see threat description. After reviewing or making changes, click Apply actions.
Windows 8, Windows Defender Alert, list of detected threats. You can change actions and view details. Click 'Apply actions' after you're done.

If you clicked the Clean PC button, Windows Defender will apply default actions and present a list of removed malware. Again, use the Show details button for more detailed descriptions of the selected item.
Click Close.
Windows 8, Windows Defender Alert, list of removed threats. Click Close.

In some cases, a restart is required to remove all traces of malicious software. It is strongly recommended to reboot your PC right away in such situations.

Advanced usage - scan just one file or folder with Windows Defender in Windows 8 and 8.1

If you need to scan one or more folders or drives (you cannot choose individual files to scan) with Windows Defender, open the Home tab and choose Custom from the Scan options section on the right. Then click Scan now.
This opens a standard browse dialog: use checkboxes to select folder or folders and click OK to run the scan.
Windows 8, Windows Defender, Home tab. To scan just a specific folder and its subfolders, choose 'Custom' from 'Scan options'. Then click or tap 'Scan now'. Windows 8, Windows Defender, Custom scan browse dialog. Use check boxes to select the folder or folders to scan. Click OK to start scanning.

While the Windows Defender context menu is not available in File Explorer of Windows 8 and 8.1, you can still use Command Prompt for scanning (and cleaning) just one file or folder. If you choose to scan a folder, all its subfolders will be scanned, too.

First, open File Explorer (Windows Key+E) and navigate to C:\Program Files\Windows Defender folder. Open File menu on Ribbon (if it is not visible, use keyboard shortcut Alt+F), expand Open command prompt, and click Open command prompt as administrator.
Windows 8, File Explorer, File menu. Expand 'Open command prompt' and click 'Open command prompt as administrator'.

Click Yes in User Account Control. This will open the so-called elevated Command Prompt in the Windows Defender program folder.

Next, use File Explorer to navigate to the folder or file you want to scan. Hold down the Shift key on the keyboard and right-click (or tap and hold) the folder or file. Then choose Copy as path. This will copy the full path to the item to Clipboard.
Windows 8, File Explorer, Shift+right-click context menu. Select 'Copy as path'.

Now activate the Command Prompt window you opened earlier and type the following command: MpCmdRun -Scan -ScanType 3 -File. Add a space after "-File" and right-click in the window. Choose Paste to add the copied path.
Press the Enter key to launch the command.
Windows 8, Administrator Command Prompt. Type 'MpCmdRun -Scan -ScanType 3 -File' and add a space. Right-click inside the window and select Paste.

The "-ScanType 3" tells Windows Defender to perform a custom scan. As you might remember from the Configure Windows Defender in Windows 8 and 8.1 article, "-ScanType 1" means a Quick scan, and "-ScanType 2" means a Full scan.
Only "-ScanType 3" allows using the additional "-File" switch for specifying a file or folder to scan for viruses and malware.

Please wait until the scan completes. If no malicious items were detected, the "Scanning found no threats" message is displayed.
Windows 8, Administrator Command Prompt, Scanning found no threats. It is safe to close the window.

If one or more threats were detected, Windows Defender will try to disinfect these. A pop-up notification (called Toast notification in Windows 8/8.1) appears upon malware detection.
The "Cleaning finished" message should appear after threat removal is complete.
Windows 8, Administrator Command Prompt, Cleaning finished. It is safe to close the window. Windows 8, Malware Detected, Windows Defender is taking action to clean detected malware. Stand by.

You can either close the Administrator Command Prompt window or run another custom scan. You can recall the last command by pressing the Arrow Up key (↑) - just delete the path after "-File" switch and paste a new path.

Making the scanning easier

If you need to perform manual scans frequently, you can create a special batch file on your Desktop.
Thank you Yugarian for the tip!

Open Start screen or Start menu using Windows Key and type "notepad". Click the result.
Windows 8, Start screen. Type 'notepad' and click the result.

Type (or copy & paste) the following lines:

"C:\Program Files\Windows Defender\MpCmdRun.exe" -Scan -ScanType 3 -File %1
Windows 8, Notepad, automating Windows Defender scans.

The first line disables the displaying of each command while running the scan. The "%1" at the end of the second line means the first supplied folder or file name. The third line causes Command Prompt to pause until a user presses a key - otherwise, the Command Prompt window would close automatically in less than a second after the scan completes.

Now open the File menu and click Save As.
Windows 8, Notepad. Open File menu and click Save As.

First, select All Files (*.*) from the Save as type combo box. Then set a File name for the batch file - "Defender Scan.cmd" in this example. You can change the name as you like, but make sure you include the ".cmd" extension in the end, this makes the batch file executable.
Click Save.
Windows 8, Notepad, Save As. Choose 'All Files' for 'Save as type'. Set a name and end it with '.cmd'. Click Save.

Now you can drag any folder or file from File Explorer onto the batch file icon on Desktop and the item will be scanned.
Windows 8, Desktop. Drag any file or folder onto the batch file icon.

Adding Windows Defender to Send To menu

To make on-demand scanning even easier, there is a neat trick to add the previously created batch file to users' Send To menu.

First, open File Explorer. Then open the View tab on Ribbon (if Ribbon is not visible, use keyboard shortcut Ctrl+F1) and make sure the Hidden items check box is ticked. This enables the displaying of hidden files and folders.

Second, copy the previously created batch file (Defender Scan.cmd) - right-click it and select Copy. Using keyboard shortcut Ctrl+C works equally well.

Third, back in File Explorer, locate and open C:\Users folder, double-click the subfolder with your user name, and navigate to AppData\Roaming\Microsoft\Windows\SendTo subfolder.
For example, if your user name were Linus, the full path would be C:\Users\Linus\AppData\Roaming\Microsoft\Windows\SendTo.

Fourth, paste the batch file into the Send To folder using keyboard shortcut Ctrl+V or by right-clicking in an empty space and selecting Paste.

If done correctly, the batch file is now available in the Send To menu. Just right-click a file or folder, expand the Send To menu and see if there is a Defender Scan.cmd (the name is different if you saved the batch file with some other name) entry.
Windows 8, Send To menu, Windows Defender entry

In case there are other users on the same computer, you should copy the batch file to their SendTo folder also.


Ctrl+F searches in the contents

Next: Microsoft Security Essentials
Previous: Configure Windows Defender in Windows 8 and 8.1