1

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:

I'm using Powershell v5.1 on Windows 7.
What could the reason be?

magikarp
  • 460
  • 1
  • 8
  • 22

2 Answers2

2

Have you tried

Import-Module Defender

I am not sure if the module exists on Windows 7 yet tough...

marsze
  • 15,079
  • 5
  • 45
  • 61
1

Use 64bit Powershell:

C:\windows\sysnative\WindowsPowershell\v1.0\powershell.exe