Command Prompt and PowerShell
DUPRE
-
brucine Posted messages 24969 Registration date Status Member Last intervention -
brucine Posted messages 24969 Registration date Status Member Last intervention -
Hello,
The Set-MpPreference command is not recognized by Windows 11.
Wishing to purge the history of Windows Defender, I ran the command Set-MpPreference -ScanPurgeItemsAfterDelay 1, which is not recognized by either the command prompt or PowerShell versions 32 and 64 bit as an administrator.
I then tried the Set-MpPreference command alone and with the extensions provided by Microsoft. The same issue persists.
I’m not sure if I made a mistake in the syntax.
Thank you for your insights.
François Dupré
The Set-MpPreference command is not recognized by Windows 11.
Wishing to purge the history of Windows Defender, I ran the command Set-MpPreference -ScanPurgeItemsAfterDelay 1, which is not recognized by either the command prompt or PowerShell versions 32 and 64 bit as an administrator.
I then tried the Set-MpPreference command alone and with the extensions provided by Microsoft. The same issue persists.
I’m not sure if I made a mistake in the syntax.
Thank you for your insights.
François Dupré
2 answers
-
Hello again,
Still in administrator mode, launch PowerShell in 64-bit mode which, despite its name, is obtained via
Windows PowerShell (x86) so at the path %SystemRoot%\syswow64\WindowsPowerShell\v1.0\powershell.exe -
And the possible error 0x800106ba does not say that the command is not recognized, but that Windows Defender is not enabled, either because the service is not set to automatic, because a third-party protection software has disabled it, or in the presence of malware that disables it.