如何通过powershell脚本向Microsoft Security Essentials(MSE、Windows 7)添加排除?
我需要能够使用powershell(或cmd)脚本将防病毒排除添加到Windows 7上的MSE。如果我使用:如何通过powershell脚本向Microsoft Security Essentials(MSE、Windows 7)添加排除?,powershell,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 recogniz
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
术语“Add-MpPreference”未被识别为cmdlet的名称,
函数、脚本文件或可操作程序。检查
名称的拼写,或者如果包含路径,请验证路径是否正确
请更正并重试。
第1行字符:17
+添加MpPreference如果要在PowerShell中执行此操作,为什么要使用批处理文件和vbscript标记问题?或者使用批处理文件请复制错误消息并粘贴到问题中。因此没有seer来透露此类信息。您是否正在运行任何其他防病毒软件,如McAfee或Symantec?如果我确实是seer,我会说您遇到了一些错误,如术语“Add-MpPreference”不被识别为cmdlet、function、,脚本文件…bla bla
。如果要在PowerShell中执行此操作,为什么要使用批处理文件和vbscript标记问题?或者使用批处理文件,请复制错误消息并将其粘贴到问题中。因此没有seer来透露此类信息。您是否正在运行任何其他防病毒软件,如McAfee或Symantec?如果我确实是seer,我会说您遇到一些错误,如术语“Add-MpPreference”不被识别为cmdlet、函数、脚本文件的名称…bla-bla
。