由于Windows自帶的殺毒軟件偶爾會誤刪軟件,在我們部署公司產(chǎn)品以后,經(jīng)常會被破環(huán),導(dǎo)致軟件產(chǎn)品異常。
為避免這種情況,快速解決此類問題,可通過 powershell 環(huán)境,將產(chǎn)品目錄添加到?Windows Defender 排除選項(xiàng)中。
打開?powershell (可以在 開始-->運(yùn)行 中 執(zhí)行 powershell),執(zhí)行一下命令:
1、使用 PowerShell cmdlet 啟用 Windows 上的 自動排除列表
Set-MpPreference -DisableAutoExclusions $False
2、排除指定路徑 以及 路徑下的所有 文件
Add-MpPreference -ExclusionPath "D:\AppPath"
3、排除指定 文件擴(kuò)展名
Add-MpPreference -ExclusionExtension ".ExName"
4、排除 指定程序
Add-MpPreference -ExclusionProcess "D:\Program Files\AppPath\Project.exe"
排除指定文件 避免被?Windows Defender 掃描誤刪,容易出現(xiàn)安全隱患,請大家謹(jǐn)慎操作。