Sometimes I am presented with scenarios where I have to assist different IT team members with performance issues on servers and workstations. In most cases, the support teams’ goal is to rule out Defender for Endpoint as a performance bottleneck.
The process below is what I use the temporarily disable Defender for Endpoint for troubleshooting purposes:
1- Locate the device in Device – Microsoft Defender and enable Troubleshooting mode. (Allow a few minutes for the command to be pushed to the device and sync properly.)

Troubleshooting mode will be active for 4 hours.

2- On the device in question, open PowerShell as a Local Administrator and run the command:
Set-MPPreference -DisableTamperProtection $true
3- Confirm DisableTamperProtection is enabled:
Get-MPPreference | Select DisableTamperProtection
4- Open Windows Security > Virus & threat protection > Virus & threat protection settings > Manage settings.
5- Disable the settings:
Real-time protectionCloud-delivered protectionAutomatic sample submission
Method #2
You may not be able to disable the SENSE service. If you need it disabled, follow the steps below.
- Start Registry Editor.
- In Registry Editor, right-click the “HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Sense“ subkey, and then select Permissions.
- In the
Permissionswindow that opens, selectAdvanced. - At the top of the
Advanced Security Settingswindow, selectChangenext to the listed owner. - In the
Select User,Computer,Service Account, orGroupwindow, type the name of your Windows user account (user_account) in theEnter the object name to selectbox, and then selectCheck Names to validate the account name. - Select
OKtwo times. - In the
Permissionswindow, select theUsers group, and then select theAllowcheck box for theFull Controlpermissions. - Run “Set-ItemProperty -Path “HKLM:\System\CurrentControlSet\Services\Sense” -Name “Start” -Value 4“
IMPORTANT!
You MUST switch everything back to its original “Enabled” state:
SENSEservice: “Set-ItemProperty -Path “HKLM:\System\CurrentControlSet\Services\Sense” -Name “Start” -Value 2“Real-time protection(Via Windows Security console)Cloud-delivered protection(Via Windows Security console)Automatic sample submission(Via Windows Security console)
Tamper Protection: “Set-MPPreference -DisableTamperProtection $false“
