如何使用 Windows Defender 從命令列進行掃描?

如何使用 Windows Defender 從命令列進行掃描?

我正在嘗試從命令列執行 Windows Defender 掃描。根據我找到的文章這裡我應該能夠運行以下命令:

"C:\program files\windows defender\mpcmdrun.exe" -scan 0

但是,當我運行此命令時,出現以下錯誤:

“錯誤的命令列 - 命令列 - 選項應以 '-' 或 '/' 0 開頭”

關於我做錯了什麼有什麼想法嗎?據我了解這應該有效嗎?

答案1

簡單回答:"C:\program files\windows defender\mpcmdrun.exe" -scan -scantype 2

詳細說明:

1)打開一個簡單的(未提升)命令提示字元。沒有必要打開高架。

2) 輸入/複製-->"C:\program files\windows defender\mpcmdrun.exe" -scan -scantype 2

C:\程式檔案\Windows Defender\mpcmdrun.exe應該是 mpcmdrun.exe 的預設位置

僅使用-掃描參數將使用 Windows Defender/Essentials 的預設設置

為了確定它將被執行全系統掃描,你需要使用-掃描類型2參數,如 mpcmdrun 幫助中所述。

3) 如果發生錯誤,請先嘗試找到電腦上 mpcmdrun.exe 檔案的位置。

這通常可以透過簡單的搜尋輕鬆完成:

從命令提示字元處:dir /a /b /s c:\mpcmdrun.exe

在運行視窗中,快速鍵:Windows 鍵 + R 鍵 (Windows + R),或從 Windows vista/7 搜尋框(按一下開始按鈕後的右側),或從 Windows 8/8.1 超級搜索,或從Windows 8/8.1 - 右鍵點選開始按鈕- 運行:

cmd /k dir /a /b /s c:\mpcmdrun.exe

從 mpcmdrun 幫助中提取:

-Scan [-ScanType #] [-File <path> [-DisableRemediation]]  Scans for malicious software
-Scan [-ScanType value]
        0  Default, according to your configuration
        1  Quick scan
        2  Full system scan
        3  File and directory custom scan

           [-File <path>]
                Indicates the file or directory  to be scanned, only valid for custom scan.

答案2

直接從開始運行輸入:

cmd /kc:\progra~1\window~2\MpCmdRun.exe -signatureupdate && c:\progra~1\window~2\MpCmdRun.exe -scan -scantype 2

輸出:

簽名更新開始。 。 。

簽名更新完成。無需更新

掃描開始...

掃描完成。

如果不起作用,請檢查“c:\program files”和“c:\program files\windows Defender”的真實路徑名;直接從開始運行輸入:

cmd /k 目錄 c:\pro* /x

輸出:

22/01/2013 22.38 程序~1 程式檔案

09/02/2013 21.14 PROGRA~2 程式檔案 (x86)

直接從開始運行輸入:

cmd /k 目錄 c:\progra~1\windows* /x

輸出:

2012年11月25日 20.56 窗口~2 Windows Defender的

25/11/2012 20.56 WIA843~1​​ Windows 日記本

25/11/2012 20.56 WI6A8C~1 Windows 郵件

13/01/2013 14.23 WI54FB~1 Windows 媒體播放器

26/07/2012 09.13 WI7A8C~1 Windows 多媒體平台

26/07/2012 09.12 WINDOW~3 Windows NT

25/11/2012 20.56 WINDOW~4 Windows 相片檢視器

26/07/2012 09.13 WIBFE5~1 Windows 便攜式設備

答案3

0檢測為參數。刪除它並重試(0無論如何這是預設的)。

相關內容