Microsoft includes this setting in its official Attack Surface Reduction (ASR) recommendations. You can read the documentation for this rule on Microsoft Learn.
What is Block rebooting machine in Safe Mode?
Block rebooting machine in Safe Mode is a Microsoft Defender ASR rule that blocks certain attempts to restart Windows in Safe Mode.
Although Safe Mode is an entirely legitimate tool for maintenance and recovery, some malware and ransomware families use this technique to run encryption while part of the security software is not active, or to try to bypass certain protection mechanisms.
When this rule is enabled, Microsoft Defender detects this behaviour and prevents the restart from happening.
Why is it important to enable this rule?
In recent years, various malware and ransomware families have added this technique to their attack chains.
Their goal is to lower the device's protection before running the malware.
By enabling this rule you will:
- Reduce evasion techniques used by malware.
- Prevent malicious restarts in Safe Mode.
- Increase Microsoft Defender's protection.
- Get audit events to investigate suspicious attempts.
As with the other ASR rules, Microsoft recommends starting in Audit mode before enabling the final block.
How to enable Block rebooting machine in Safe Mode from Intune
The easiest way to configure this rule is with Microsoft Intune.
Step 1. Create an ASR policy
Go to the Microsoft Intune portal.
Navigate to:
Endpoint Security → Attack Surface Reduction → Create Policy
Select:
- Platform: Windows 10, Windows 11 and Windows Server.
- Profile: Attack Surface Reduction Rules.
Step 2. Configure the rule
Inside the policy, find:
Block rebooting machine in Safe Mode
Initially select:
Audit
This way you can check whether any internal procedure could be affected before blocking the action.
Step 3. Assign the policy
Assign the policy to a pilot group of devices.
For example:
- IT department devices.
- Lab devices.
- A small group of users.
Once its behaviour has been validated, you can roll it out to the rest of the organisation.
Step 4. Switch the rule to Block mode
After a few days of monitoring, and if there are no issues, change the setting from:
Audit → Block
From then on, Microsoft Defender will automatically block the attempts covered by this rule.
How to check that it is working
You can verify the configuration from Microsoft Defender or directly on the device.
With PowerShell, run:
Get-MpPreference | Select AttackSurfaceReductionRules_Ids, AttackSurfaceReductionRules_ActionsYou can also review the events in Microsoft Defender XDR using Advanced Hunting, or check the Windows Defender Operational log in Event Viewer.
Recommendations
Before enabling this rule in production, we recommend that you:
- Deploy it first in Audit mode.
- Validate its behaviour over several days.
- Roll it out through pilot groups.
- Review the generated events regularly.

