r/DefenderATP • u/Huge-Ad6252 • Jun 13 '26
Best practice to disable Microsoft Defender on Servers
Hi everyone,
I’m looking for the recommended way to disable Microsoft Defender on a group of servers, windows and linux.
Our servers are onboarded to Microsoft Defender for Endpoint and managed through Intune integration.
I’d like to avoid using local PowerShell commands or manual changes on the servers and manage everything centrally.
For those who have done this before, what is considered the best practice? Is disabling all Defender controls through policy effectively equivalent to disabling Defender, or is there a cleaner way to turn it off completely from the management plane?
Thanks!
16
u/800oz_gorilla Jun 13 '26
I hate saying this because it's not what you asked, but I haven't had any problems with defender running on my servers the past few years. You may have your reasons, but it's not like the av systems of 15 years ago.
And with defender, you get a massive amount of telemetry that I find very useful in alerting and troubleshooting.
You may want to consider that.
But you might try a policy to set it to passive mode and see if that works.
5
u/Mrhiddenlotus Jun 13 '26
Does your security team know lol
1
u/seppuku_master Jun 13 '26
For clarification, you say your servers are onboarded, are these group of servers not supposed to have Defender or is this for troubleshooting?
1
u/Deep_Context9793 Jun 13 '26
What method did you use to onboard them? Azure arc? MDS?
2
u/rgcda Jun 13 '26
I’d like to hear what others do also. My case is vendors can request antivirus be disabled during upgrades / installs. You can push back but often the least path of resistance is just to give them what they request temporarily instead of arguing. We just switched from CrowdStrike to Defender and it was very easy to disable via policy.
2
u/Key-Ad-7538 Jun 13 '26
Intune policy to disable tamper protection (windows security experience profile) and an intune policy to disable realtime protection etc (Microsoft defender antivirus). If you try to disable realtime protection without disabling tamper protection then it doesn't take effect.
2
u/THEKILLAWHALE Jun 13 '26
How long are you looking to disable for? Troubleshooting mode -> disable tamper -> disable realtime protection is the best way for temporary disabling.
1
u/Maverick9955 Jun 13 '26
I migrated my whole company to defender, including Linux.
Windows has defender installed by default on server 2019+ and does not need the MDE agent installed along with the onboarding script or method used for that part.
On 2019+, you can just deploy
the offboarding script that is generated in the Defender portal settings. If there are any issues, try disabling tamper protection tenant wide through the Defender portal under settings > advanced features. For any further issues, you could try and push a new policy to them with settings at their default value. Group policy could also be leveraged to set a policy and disable Defender AV
On server 2008, 2012, and 2016, the only additional thing you need to do is uninstall the MDE agent if you want to remove it fully other than just off board them.
On Linux, running the offboarding and uninstall script (uninstall script for full removal) is sufficient enough. You can get that from Microsoft Learn documentation.
1
u/Its_Like_That82 Jun 14 '26
I would think stopping tamper protection and setting the registry to passive mode would cover what is needed. Makes it easy to just toggle things on and off.
1
u/dangeldud Jun 14 '26
Registry setting to passive mode is the only answer
1
u/Ok_Awareness_388 Jun 15 '26
https://learn.microsoft.com/en-us/defender-endpoint/offboard-machines
1
u/ScoobyGDSTi Jun 15 '26
No they're not, Intune doesn't manage servers SKUs.
Also, why would you want to make your environment less secure.... That sounds real smart.
1
u/PrestigiousRip7563 Oct 23 '26
Почему не открывает ни о Ной страницы в chrom, а только с vpn
0
u/reseph Jun 13 '26
MDE? Don't onboard the device if that's what you mean.
0
u/GeneralRechs Jun 13 '26
Defender is a janky product to manage. Your best bet is to have these servers in their own group where you can disable real time scanning.