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 provides real-time protection against viruses, malware, and network attacks. In my opinion, Windows Defender is one of the best and most reliable free security software because it offers all the tools you need 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 perform a special scan of files from storage devices or other sources. (For example, if you inserted a USB drive belonging to another user, or if you downloaded a file from the Internet or received it via e-mail.)
In this guide, we have shown 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 the right-click menu.
Method 2. Run a custom or full virus scan with Defender.
Method 3. Scan for viruses from the command line.
Method 3. Scan for viruses from PowerShell.
Method 1. How to scan a specific folder or file using the right-click menu.
The easiest way to scan a specific item (file, folder, disk) with Windows Defender is to use the right-click menu:
1. Right click on the item you want to check for threats.
2. Choose Scan with Microsoft Defender from the context menu.
3. You will see the Windows Security window open and the selected folder or file will be scanned for malware.
4. When the scan is complete:
a. If any threat is found, click on it Start the action button and allow the system to perform the necessary actions and remove them.
b. If no threats are found, the scanned item is clean and no further action is required.
Method 2. How to perform a CUSTOM Scan with Windows Defender security software.
Another way to scan a folder, file or external USB drive is to use the “Custom scan” option in Windows 10 Security:
1. open the Running button and click the command window Win and R keys at the same time.
2. Enter the following and click Enter:
3. click on Protection from viruses and threats and open it Scan settings.
4. Choose Custom Scan* and press Scan now. *
*Note: Select to scan your entire system for malware Full scan option and then click Scan now.
5. In the Select Folder window, select the folder/file or drive you want to scan for threats and click on it. Select a folder button.
Method 3: How to check for viruses with Defender using the command line
To scan your system from the command line with Windows 10 Defender Antivirus:
1. It’s open Command line as administrator. For this:
Open 1 Run command window by holding the keys Win + R at the same time.
2. Stand up cmd Press the & buttons Ctrl+Shift+Enter. *
*Note: At the “User Access Control (UAC)” permission prompt, click on it Yes.
2. In the Command Prompt window, execute the following commands in order (click Enter After entering each command).
- cd c:\ProgramData\Microsoft\Windows Defender\Platform\
3. From the folders in the list, find the name of the most recently created folder, which indicates the latest platform version of Defender. *
*Note: The folder names indicate which versions of Windows Defender Platform are installed on the system. The most recently created folder is the latest platform version of Windows Defender.
4. Now type the following command and click Enter:*
- cd Latest platform version
*Note: In this example, the latest platform version is “4.18.2108.7-0”, so the command would be:
|5. To scan a specific folder or file, issue the following command: *
Example: if you want to scan a folder named “”.sample” Located on the desktop (C:\Users\admin\Desktop\Sample), the command used is:
1. To run a Quick Check issue the following command for viruses from the command line:
2. To implement a Full scan for viruses issue the following command:
Method 4: How to Scan for Viruses from PowerShell Using Windows Defender
To scan your system for PowerShell threats:
1. It’s open PowerShell as administrator. For this:
2. From PowerShell, issue the following command to scan a specific folder/file for viruses: *
Example: if you want to scan a folder named “”.sample” Located on the desktop (C:\Users\admin\Desktop\Sample), the command would be::
1. To whom Quick Check Issue this command from PowerShell to your computer
2. To run a Full scan Issue the following command from PowerShell:
That’s it! Which method worked for you?