On running Set-MpPreference -DisableScriptScanning 1
, I'm getting:
The term 'Set-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:1
+ Set-MpPreference -DisableScriptScanning 1
~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Set-MpPreference:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
I've gone through the following threads, but nothing seems to work:
- Add-MpPreference is not recognized as a name
- Powershell Set-MpPreference -DisableRealtimeMonitoring $true not working
I'm using Powershell v5.1 on Windows 7.
What could the reason be?