如何通过PowerShell脚本向Microsoft Security Essentials(MSE,Windows 7)添加排除项?

时间:2017-10-11 17:44:52

标签: powershell

我需要能够使用PowerShell(或cmd)脚本在Windows 7上向MSE添加防病毒排除。如果我使用:

Add-MpPreference -ExclusionPath "C:\Temp"
Add-MpPreference -ExclusionPath "C:\Users\ME\Desktop"
PowerShell中的

(适用于Windows 10 Windows Defender)我收到此错误:

The term 'Add-MpPreference' is not recognized as the name of a cmdlet, 
function, script file, or operable program. Check
the spelling of the name, or if a path was included, verify that the path is 
correct and try again.
At line:1 char:17
+ Add-MpPreference <<<<  -ExclusionPath "C:\Temp"
+ CategoryInfo          : ObjectNotFound: (Add-MpPreference:String) [], 
CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

有什么想法吗?

0 个答案:

没有答案