I am looking for a way to disable Windows Defender on Windows 8/8.1/10 using the command line. Everything I've found so far has involved using a GUI at some point, and this isn't useful for a process I am looking to automate using a script. Thanks in advance.
-
@Moab I did see that one, but I need a way to do it using the command line, preferably without batch files or similar.– AWarnockCommented Jan 13, 2016 at 15:05
-
A batch file is nothing more than a bunch commands for the command prompt, the reason you use a batch file is because there is too many commands to do it manually for what you want to do.– MoabCommented Jan 13, 2016 at 15:51
1 Answer
The easiest way to do this would be to use PowerShell to disable it, the command you probably want is this:
Set-MpPreference -DisableRealtimeMonitoring $true
For an article on using PowerShell to disable/enable Windows Defender check here: http://wmug.co.uk/wmug/b/pwin/archive/2015/05/12/quickly-disable-windows-defender-on-windows-10-using-powershell
Here is the TechNet article for a more detailed look at available defender cmdlets: https://technet.microsoft.com/en-us/library/dn433280.aspx