每台 Windows 10 机器都预装了Microsoft Windows Defender 防病毒软件(Microsoft Windows Defender Antivirus)。Windows Defender是一款功能强大的反恶意软件和防病毒软件,可按需提供实时系统保护和数据安全功能。
此应用程序可以满足您的安全需求,并且还可以与其他防病毒和反恶意软件完美配合。后台保护足够强大,但在某些情况下,您可能需要扫描特定文件和文件夹中的恶意软件或病毒。
即使Microsoft Defender持续监控您的计算机系统,但对于勒索(ransomware)软件和类似风险,您仍然可以要求它扫描单个文件。这篇文章将向您展示使用Microsoft Defender扫描特定文件和文件夹的三种方法。
使用Microsoft Defender(Microsoft Defender)扫描单个文件和文件夹
我将向您介绍使用Microsoft Defender扫描单个文件和文件夹的三种最佳方法。这三种方式包括以下内容:
- 使用文件资源管理器。
- 使用 PowerShell。
- 使用命令提示符。
这就是我们将要处理的三种方法。继续(Continue)阅读执行这些过程的完整步骤。
1]使用文件资源管理器使用(File Explorer)Microsoft Defender扫描(Scan)特定文件或文件夹
这是使用Microsoft Defender(Microsoft Defender)扫描文件或文件夹的最直接方法。
- 按 Windows key + E组合键打开文件资源管理器(File Explorer)。
- 导航到文件或文件夹所在的目录。您也可以通过从“开始(Start)”菜单中搜索文件或文件夹来到达此处。
- 接下来,从搜索结果中右键单击它并选择Open file location。
- 在文件的文件夹中,右键单击文件并选择使用 Microsoft Defender 扫描 (Scan with Microsoft Defender )选项。
- 单击该选项将在其病毒和威胁防护(Virus & threat protection)页面上启动Microsoft Defender 。
此页面向您显示恶意软件扫描的进度和结果。您还会发现其他扫描模式。
- 完整扫描 (Full scan )需要最长的时间,因为它会检查系统上的每个文件以及正在运行的进程。
- 快速扫描 (Quick scan )选项更快, 因为它只扫描最常见的恶意软件位置。
您可以使用自定义扫描(Custom scan)添加要手动扫描的位置 ,但此选项不适用于单个文件,仅适用于文件夹。
2] 使用PowerShell使用(PowerShell)Microsoft Defender扫描(Scan)特定文件或文件夹
如果您更喜欢使用命令行类型的Windows用户,您可能更喜欢使用(Windows)PowerShell扫描文件或文件夹。按(Press)Windows键并搜索 PowerShell。右键单击PowerShell并选择以管理员身份运行(Run as Administrator)。
要扫描文件夹,请在PowerShell窗口中输入以下命令并按 ENTER(ENTER)键:
Start-MpScan -ScanType CustomScan -ScanPath "C:\THE\FOLDER\DIRECTORY\PATH"
注意:(NOTE: )将上述命令的\THE\FOLDER\DIRECTORY\PATH 部分更改为要扫描的文件的实际路径。
除非您希望扫描整个文件夹,否则请确保该位置指向特定文件而不是整个文件夹。在这种情况下,路径以文件扩展名结尾。
因此(Hence),命令将如下所示:
Start-MpScan -ScanType CustomScan -ScanPath "C:\THE\FILE\DIRECTORY\PATH.extension"
3]使用命令提示符使用(Command Prompt)Microsoft Defender扫描(Scan)特定文件或文件夹
您还需要以管理员身份运行(Administrator)命令提示符(Command Prompt)以使用Microsoft Defender扫描文件或文件夹。因此(Therefore),按Windows键并搜索cmd。
右键单击命令提示符(Command Prompt)并选择 以管理员身份运行(Run as Administrator)。在命令提示符(Command Prompt)中键入以下命令,然后按ENTER键。
cd c:\ProgramData\Microsoft\Windows Defender\Platform
上述命令将您带到 Windows Defender的(Windows Defender)Platform文件夹。下一步是确定最新版本的Microsoft Defender。
键入以下命令并按ENTER。
dir
运行上述命令时,命令提示符(Command Prompt)会显示防病毒软件的版本号。记下这个数字。
在命令提示符(Command Prompt)中运行的下一个命令将使用上述步骤中的版本号。键入 cd
,粘贴您复制的数字,然后按ENTER。
所以,它看起来像这样:
cd 4.18.2011.6-0
接下来,在命令提示符(Command Prompt)中键入以下命令并按 ENTER(ENTER)。此命令扫描指定文件夹:
mpcmdrun -Scan -ScanType 3 -File "C:\PATH\TO\FOLDER"
注意: 将上述命令的(NOTE: )C:\PATH\TO\FOLDER区域更改为 要扫描的文件夹的路径。如果要扫描特定文件而不是文件夹,请将路径更改为文件的路径。在这种情况下,命令将以文件扩展名结尾并采用以下格式:
mpcmdrun -Scan -ScanType 3 -File "C:\PATH\TO\FILE.extension"
对于命令提示符(Command Prompt)和PowerShell方法,Windows Defender将仅扫描您在命令中指定的文件夹或文件。您还可以利用PowerShell的Windows Defender 模块(Windows Defender Modules)。
希望这可以帮助。
How to manually scan individual files and using Microsoft Defender
Every Windows 10 machіne comes with Microsoft Windows Defender Antivirus pre-installed. Windows Defender is a capable antimalware and antivirus software that offers real-time system protection and data security functions on demand.
This application can take care of your security needs and it also works perfectly with other antivirus and antimalware software. The background protection is robust enough, but in some situations, you may need to scan specific files and folders for malware or viruses.
Even though Microsoft Defender continuously monitors your computer system, for ransomware and similar risks, you can still ask it to scan individual files. This post will show you three ways to scan specific files and folders with Microsoft Defender.
Scan individual files & folders using Microsoft Defender
I’ll walk you through the three best ways to scan individual files and folders with Microsoft Defender. The three ways include the following:
- Using File Explorer.
- Using PowerShell.
- Using Command Prompt.
Those are the three methods we’ll treat. Continue reading for the complete steps for carrying out these processes.
1] Scan a specific file or folder with Microsoft Defender using File Explorer
This is the most straightforward way to scan a file or folder with Microsoft Defender.
- Press the Windows key + E key combination to open File Explorer.
- Navigate to the directory in which the file or folder is located. You could also get here by searching for the file or folder from the Start menu.
- Next, right-click on it from the search results and select Open file location.
- In the file’s folder, right-click on the file and select the Scan with Microsoft Defender option.
- Clicking on that option will launch Microsoft Defender on its Virus & threat protection page.
This page shows you the progress and results of your malware scans. You’ll also find other scanning modes.
- A Full scan takes the longest as it checks every file on your system, as well as running processes.
- The Quick scan option is quicker because it only scans the most common malware locations.
You can add the locations to scan manually using a Custom scan, but this option doesn’t work for individual files, only folders.
2] Scan a specific file or folder with Microsoft Defender using PowerShell
If you’re more of a command-line type of Windows user, you may prefer scanning the file or folder using PowerShell. Press the Windows key and search for PowerShell. Right-click on PowerShell and choose to Run as Administrator.
To scan a folder, input the command that follows in the PowerShell window and hit the ENTER key:
Start-MpScan -ScanType CustomScan -ScanPath "C:\THE\FOLDER\DIRECTORY\PATH"
NOTE: Change the\THE\FOLDER\DIRECTORY\PATH part of the above command to the actual path to the file for scanning.
Unless you wish to scan the entire folder, ensure that the location leads to the specific file and not the entire folder. In this case, the path ends with a file extension.
Hence, the command will look like this:
Start-MpScan -ScanType CustomScan -ScanPath "C:\THE\FILE\DIRECTORY\PATH.extension"
3] Scan a specific file or folder with Microsoft Defender using Command Prompt
You also need to run Command Prompt as an Administrator to scan files or folders with Microsoft Defender. Therefore, press the Windows key and search for cmd.
Right-click on Command Prompt and choose Run as Administrator. Type the following command inside Command Prompt and hit the ENTER key.
cd c:\ProgramData\Microsoft\Windows Defender\Platform
The above command takes you to the Platform folder of Windows Defender. The next step is to determine your latest version of Microsoft Defender.
Type in the following command and press ENTER.
dir
On running the above command, the Command Prompt displays the version number of the antivirus. Take note of this number.
The next command to run in Command Prompt will use the version number from the above step. Type cd
, paste the number you copied, and press ENTER.
So, it will look like this:
cd 4.18.2011.6-0
Next, type the following command in Command Prompt and hit ENTER. This command scans the specified folder:
mpcmdrun -Scan -ScanType 3 -File "C:\PATH\TO\FOLDER"
NOTE: Change the C:\PATH\TO\FOLDER area of the above command to the path to the folder you want to scan. If you wish to scan a specific file, not a folder, change the path to that of the file. In this case, the command will end with a file extension and be in the following format:
mpcmdrun -Scan -ScanType 3 -File "C:\PATH\TO\FILE.extension"
For the Command Prompt and PowerShell methods, Windows Defender will only scan the folder or files that you specified in the command. You can also take advantage of PowerShell’s Windows Defender Modules.
Hope this helps.