Computer >> Computer tutorials >  >> Troubleshooting >> computer maintenance

How to Use Windows Defender to Scan a Folder or File or your Entire System for Malware.

If you want to learn, how to use Windows Defender to scan a specific file/folder, or your entire system for malware, continue reading below.

Windows Defender (or "Windows Security"), is a built-in security program in Windows 10 that offers real-time protection against viruses, malware and network attacks. In my opinion, Windows Defender is one of the best and most reliable free security programs because it offers all the necessary tools to protect your Windows system, including: Virus and threat protection, firewall and network protection, application and browser control, etc.

To keep Windows 10 safe and secure, it is recommended to periodically run a Full Scan of your system for viruses and always run a custom scan on storage devices or files from other sources. (For example, if you have inserted a USB disk belonging to another user, or downloaded a file from the Internet, or received by email.)

In this guide, we have demonstrated different ways to scan your system, or a specific file/folder for Malware using Windows Defender antivirus.

How to Scan Files or Folders for Viruses with Windows 10 Antivirus.

Method 1. Run Microsoft Defender Scan from Right-Click Menu.
Method 2. Perform a Custom or a Full Virus Scan with Defender.
Method 3. Scan for Viruses from Command Line.
Method 3. Scan for Viruses from PowerShell.

Method 1. How to Scan a certain Folder or File using by using the right-click menu.

The easiest way to scan a specific item (file, folder, drive) with Windows Defender, is by using the right-click menu:

1. Right-click on the item that you want to scan for threats.
2. Choose Scan with Microsoft Defender from the context menu.

How to Use Windows Defender to Scan a Folder or File or your Entire System for Malware.

 

3. You will see the Windows Security window open and the selected folder or file will be scanned for malware.

How to Use Windows Defender to Scan a Folder or File or your Entire System for Malware.

 

4. When the scan is completed:

a. If any threats are found, click on the Start actions button and let the system to take the necessary actions and to remove them.

How to Use Windows Defender to Scan a Folder or File or your Entire System for Malware.

 

b. If no threats are found, then the scanned item is clean and no any other action needed.

How to Use Windows Defender to Scan a Folder or File or your Entire System for Malware.

 

Method 2. How to perform a CUSTOM Scan with Windows Defender security program.

Another way to scan a folder, file or an external USB drive, is by using the "Custom Scan" option in Windows 10 Security:

1. Open the Run command box by holding the Win How to Use Windows Defender to Scan a Folder or File or your Entire System for Malware. and R keys at the same time.
2. Type the following and hit Enter:

  • windowsdefender:

How to Use Windows Defender to Scan a Folder or File or your Entire System for Malware.

3. Click on Virus & threat protection and open the Scan Options.
4.
Select Custom Scan* and click Scan Now. *

* Note: To scan your entire system for malware, select the Full scan option and then click Scan now.

How to Use Windows Defender to Scan a Folder or File or your Entire System for Malware.

5. In the "Select Folder" window, select the folder/file or drive that you want to scan for threats and click on the Select Folder button.

How to Use Windows Defender to Scan a Folder or File or your Entire System for Malware.

 

 

 

Method 3: How to Perform a Virus Scan with Defender using Command Prompt

To scan your system from command line with Windows 10 Defender Antivirus:

1. Open Command prompt as Administrator. To do that:

1. Open the Run command box by holding the keys Win How to Use Windows Defender to Scan a Folder or File or your Entire System for Malware. + R at the same time.
2. Type cmd & press the keys Ctrl+Shift+ Enter. *

* Note: At "User Access control (UAC)" permission prompt click on Yes.

How to Use Windows Defender to Scan a Folder or File or your Entire System for Malware.

 

2. In the command prompt window, execute the below commands in order (press Enter after typing each command) .

  • cd c:\ProgramData\Microsoft\Windows Defender\Platform\
  • dir

How to Use Windows Defender to Scan a Folder or File or your Entire System for Malware.

 

3. From the listed folders, find the name of the most recently created folder which indicates the latest platform version of Defender . *

* Note: The folder names indicates which Windows Defender platform versions are installed on the system. The most recently created folder is the latest platform version of Windows Defender.

4. Now, type the following command & hit Enter:*

  • cd Latest-Platform-Version

* Note: In this example the latest platform version is "4.18.2108.7-0", so the command will be:

  • cd 4.18.2108.7-0

How to Use Windows Defender to Scan a Folder or File or your Entire System for Malware.

 

5. In order to scan a particular folder or file give the following command: *

  • mpcmdrun -Scan -ScanType 3 -File "<path_to_required_folder_or_file>"

Example: if you want to scan a folder named "Sample" located in the Desktop (C:\Users\admin\Desktop\Sample), the command to be used is:

  • mpcmdrun -Scan -ScanType 3 -File "C:\Users\admin\Desktop\Sample"

How to Use Windows Defender to Scan a Folder or File or your Entire System for Malware.

 

* Notes.

1. To run a Quick Scan for viruses from command line give this command:

  • MpCmdRun.exe -Scan -ScanType 1

2. To perform a Full Scan for viruses give the below command:

  • MpCmdRun.exe -Scan -ScanType 2

 

 

Method 4: How to Scan for Viruses from PowerShell with Windows Defender.

To scan your system for threats from PowerShell:

1. Open PowerShell as Administrator. To do that:

1. Open the Run command box by holding the keys Win How to Use Windows Defender to Scan a Folder or File or your Entire System for Malware. + R at the same time.
2. Type powershell & press the Ctrl+Shift+ Enter keys. *

* Note: At "User Access control (UAC)" permission prompt click on Yes.

How to Use Windows Defender to Scan a Folder or File or your Entire System for Malware.

 

2. To scan for viruses a particular folder/file from PowerShell, give the following command: *

  • Start-MpScan -ScanType CustomScan -ScanPath "<path_to_the_folder_or_file>"

Example: if you want to scan a folder named "Sample" located in the Desktop (C:\Users\admin\Desktop\Sample), the command will be:

  • Start-MpScan -ScanType CustomScan -ScanPath "C:\Users\admin\Desktop\Sample"

How to Use Windows Defender to Scan a Folder or File or your Entire System for Malware.

 

* Notes:

1. To Quick Scan your PC from PowerShell, give this command

  • Start-MpScan -ScanType QuickScan

2. To run a Full Scan from PowerShell give this command:

  • Start-MpScan -ScanType FullScan

How to Use Windows Defender to Scan a Folder or File or your Entire System for Malware.

 

That's it! Which method worked for you?
Let me know if this guide has helped you by leaving your comment about your experience. Please like and share this guide to help others.