Attack surface reduction (ASR) rules and Controlled Folder Access are built into Microsoft Defender Antivirus and can be configured centrally through the Microsoft Intune admin center under Endpoint security > Attack surface reduction. Together they block many of the techniques ransomware depends on — executing malicious scripts, spawning child processes from Office apps, stealing credentials, and modifying files in protected folders. In this tutorial you will create an ASR rules policy scoped to Windows devices, enable the ransomware-relevant rules, turn on Controlled Folder Access, and assign the policy to a device group. Because misconfigured blocking rules and Controlled Folder Access can interfere with legitimate line-of-business apps, you should start with a pilot group in Audit mode and review results before enforcing Block mode broadly. You will also confirm the policy actually reached devices using Intune's device status report and on-device checks with Get-MpPreference or Windows Security.
Before you start
What you will learn
- You will learn how to create an Attack Surface Reduction policy in the Microsoft Intune admin center, enable the ASR rules and Controlled Folder Access settings that block ransomware behaviors, assign the policy to a device group, and verify it reaches your endpoints.
- Ransomware commonly relies on script abuse, credential theft, Office child processes, and unauthorized file modification. Blocking these techniques centrally through Intune reduces the attack surface across every managed Windows device without touching each machine individually.
Requirements
- Sign in to the Microsoft Intune admin center (intune.microsoft.com) with an account that can create and assign endpoint security policies. You also need target Windows devices already enrolled in Intune and reachable for the next policy check-in.
- Intune Administrator
- Endpoint Security Manager
Good to know
- Roughly 30-45 minutes to create and assign the policy; devices apply it on their next Intune check-in.
- Steps reflect the Microsoft Intune admin center and Microsoft Defender Antivirus on supported Windows client versions. Menu labels and settings can change as Microsoft updates the portal.
Quick answer
In the Microsoft Intune admin center, go to Endpoint security > Attack surface reduction and create a new policy for the Windows platform using the Attack surface reduction rules profile. Enable the ransomware-relevant ASR rules and Controlled Folder Access, assign the policy to a device group, and create it. Devices receive the policy on their next Intune check-in, and you confirm it through the policy's device status report or on-device checks.
Microsoft Intune admin center > Endpoint security > Attack surface reduction > Create PolicyStep-by-step tutorial
7 stepsConfirm prerequisites and licensing
Ensure your tenant, licenses, roles, and devices meet the requirements before creating a policy.
Microsoft Intune admin center > Devices > Windows > Windows devicesBefore building a policy, verify the following against your environment:
- Devices are enrolled in Intune and running a supported Windows version. Attack surface reduction (ASR) rules and Controlled folder access are Windows 10, Windows 11, and Windows Server features.
- Microsoft Defender Antivirus is the active antivirus on target devices and is running in active mode (not passive or disabled). ASR rules and Controlled folder access are enforced by Defender Antivirus — if a third-party AV is primary and Defender is passive, these protections will not apply.
- Real-time protection and cloud-delivered protection are turned on. Several ASR rules and Controlled folder access rely on Defender's real-time engine.
- You hold an admin role with rights to create endpoint security policies — for example Intune Administrator, or a custom role with Endpoint Security Manager permissions.
- Confirm licensing. Intune device management requires an Intune license. ASR rules and Controlled folder access are Defender Antivirus features, but rich reporting, per-rule surfacing, and advanced hunting come with Microsoft Defender for Endpoint (Plan 2 / E5). Without Defender for Endpoint you can still deploy and enforce the rules, but reporting detail is reduced.
If devices are co-managed with Configuration Manager, confirm the Endpoint Protection workload is pointed at Intune, otherwise the policy may not take effect. Defender for Endpoint is not strictly required to enforce ASR/CFA, but it is strongly recommended for visibility.
Create an Attack Surface Reduction policy
Start a new ASR rules policy scoped to Windows devices.
Microsoft Intune admin center > Endpoint security > Attack surface reduction > Create Policy- Sign in to the Microsoft Intune admin center at https://intune.microsoft.com.
- Go to Endpoint security in the left navigation, then select Attack surface reduction.
- Select + Create Policy.
- For Platform, choose Windows.
- For Profile, choose Attack surface reduction rules.
- Select Create.
- On the Basics tab, enter a clear Name (for example,
Ransomware Protection - ASR Rules - Pilot) and an optional Description noting purpose and rollout ring. Select Next.
Use a naming convention that encodes the target ring (Pilot vs Broad) and mode (Audit vs Block) so the policy is easy to identify later. The exact profile names can vary slightly as Intune templates are updated; select the profile explicitly named for ASR rules.
Configure ASR rules that block ransomware behaviors
Set the specific rules that stop common ransomware execution and propagation techniques.
Microsoft Intune admin center > Endpoint security > Attack surface reduction > [policy] > Configuration settingsOn the Configuration settings tab, set each ASR rule to Block, Audit, or Not configured. For a first rollout, start every rule in Audit so you can measure impact before enforcing.
Enable these ransomware-relevant rules:
- Use advanced protection against ransomware — targets files with ransomware characteristics.
- Block credential stealing from the Windows local security authority subsystem (lsass.exe) — limits credential theft used for lateral movement.
- Block all Office applications from creating child processes — stops a common macro-based delivery technique.
- Block Office applications from creating executable content.
- Block Office applications from injecting code into other processes.
- Block executable content from email client and webmail.
- Block execution of potentially obfuscated scripts.
- Block JavaScript or VBScript from launching downloaded executable content.
- Block process creations originating from PSExec and WMI commands (test carefully — can affect management tooling).
Block vs Audit: In Audit mode the action is logged as an event but not blocked, letting you find false positives. In Block mode the action is prevented and logged. Move rules to Block only after Audit shows no critical business impact.
Leave rules you have not yet evaluated as Not configured rather than guessing at Block — an unexpected Block can disrupt line-of-business apps and management scripts. The PSExec/WMI rule in particular can break remote management workflows, so audit it first.
Enable Controlled Folder Access
Protect key folders from unauthorized modification by untrusted apps.
Microsoft Intune admin center > Endpoint security > Attack surface reduction > [policy] > Configuration settings > Controlled folder accessStill on the Configuration settings tab, locate the Controlled folder access (folder protection) setting.
- Set Enable controlled folder access to Audit Mode for the initial rollout, or Enabled (block) once validated.
- Under Controlled folder access protected folders, add any additional folders beyond the default protected system folders (Documents, Pictures, Videos, Music, Desktop, and Favorites are protected by default). Add paths for critical data locations if needed.
- Under List of apps that have access to protected folders, add the full paths of trusted line-of-business applications that legitimately write to protected folders, to prevent false positives.
Select Next to continue to Scope tags (optional), then Next again.
Start Controlled folder access in Audit Mode — enabling block immediately often blocks legitimate apps (backup agents, PDF editors, custom tools) that write to Documents or Desktop. Review audit events, then allow-list the trusted apps by full path before switching to Enabled.
Assign the policy to a device group
Target the policy at the correct set of managed devices.
Microsoft Intune admin center > Endpoint security > Attack surface reduction > [policy] > Assignments- On the Assignments tab, under Included groups, select Add groups.
- Choose an Entra ID device group (or user group) that represents your pilot ring — a small, representative set of test devices.
- Optionally set Excluded groups for devices that must not receive the policy.
- Select Next.
Deploy to a limited pilot group first while rules and Controlled folder access are in Audit mode. Only expand to a broad production group after you have reviewed audit results and moved rules to Block.
Use a dynamic device group for the pilot ring so new test devices are picked up automatically. Avoid assigning an Audit policy and a Block policy for the same rule to overlapping groups — conflicting settings can produce unexpected states.
Review and create the policy
Finalize and deploy the configuration.
Microsoft Intune admin center > Endpoint security > Attack surface reduction > [policy] > Review + create- On the Review + create tab, check the summary: profile type, every configured ASR rule and its mode, the Controlled folder access mode and allow-lists, and the assigned groups.
- Confirm nothing is set to Block that you intended to leave in Audit for the pilot.
- Select Create.
The policy is now saved and queued for deployment. Devices receive it on their next Intune check-in — this is not instant.
Managed devices typically check in periodically (often within a few hours), and newly enrolled or actively used devices may sync sooner. You can trigger a manual sync from the device's Settings > Accounts > Access work or school or by selecting Sync on the device in Intune to speed up testing.
Verify the policy applied to devices
Confirm the settings reached target endpoints and are enforced.
Microsoft Intune admin center > Endpoint security > Attack surface reduction > [policy] > Device statusIn Intune (server side): 1. Open the policy under Endpoint security > Attack surface reduction. 2. Review the Device status / Per-setting status report to confirm devices show Succeeded rather than Error or Pending.
On a target device (client side): - Open Windows Security > Virus & threat protection > Ransomware protection to confirm Controlled folder access is on. - Or run PowerShell to inspect the enforced state (see command). AttackSurfaceReductionRules_Ids lists the applied rule GUIDs and AttackSurfaceReductionRules_Actions shows the mode per rule (0 = Not configured/Disabled, 1 = Block, 2 = Audit). EnableControlledFolderAccess shows the CFA state.
Get-MpPreference | Select-Object AttackSurfaceReductionRules_Ids, AttackSurfaceReductionRules_Actions, EnableControlledFolderAccessRun the PowerShell command in an elevated session. If results are empty or show 0, the device likely has not synced yet — force a sync and recheck. EnableControlledFolderAccess returns 0 (disabled), 1 (enabled/block), or 2 (audit). Cross-check any Block actions against your intended pilot mode before broad rollout.
Confirming Ransomware Protection Is Configured and Enforced
A successful deployment has two signals that must agree: Intune reports the policy as delivered, and the target device itself reports the settings as active.
In the Intune admin center, open your policy under Endpoint security > Attack surface reduction and review the device status/report. A healthy rollout shows targeted devices moving to a Succeeded state, meaning the ASR rules profile and Controlled Folder Access settings were received and applied at the last check-in. Devices still showing Pending simply have not checked in yet; Error or Conflict states mean another policy is setting the same value and must be reconciled.
On a target Windows device, confirm enforcement locally. Run Get-MpPreference in an elevated PowerShell session and inspect the returned values. The presence of your configured rule GUIDs and the Controlled Folder Access state proves the settings are enforced by Microsoft Defender Antivirus — not just delivered by Intune. You can also verify through Windows Security > Virus & threat protection > Ransomware protection, where Controlled folder access should reflect the state you deployed.
Remember that configured and enforced in Block mode are different outcomes. A rule set to Audit will show as active but will only log events, not block them. Interpret the device report alongside the mode you chose.
- The policy shows Succeeded for targeted devices in Intune, and on a device Get-MpPreference lists your ASR rule GUIDs with the expected action values and EnableControlledFolderAccess reflects your chosen state. Windows Security shows Controlled folder access matching your setting.
- Devices remain in Pending long after a check-in, or show Error/Conflict. A Conflict usually means another Intune policy, a Group Policy, or a security baseline is setting the same ASR rule or Controlled Folder Access value; resolve the duplicate assignment. If Get-MpPreference shows no rule GUIDs, the profile did not apply or Defender Antivirus is not the active AV.
- Typical view in the policy's per-device report during a phased rollout; Pending devices have not yet checked in.
- Action value 1 = Block, 2 = Audit, 6 = Warn, 0 = Disabled. The GUID shown here is the 'Use advanced protection against ransomware' rule.
- 1 = Enabled (blocking), 2 = Audit Mode, 0 = Disabled.
- User-facing confirmation that Controlled Folder Access is enforced on the device.
Troubleshooting
The ASR policy shows an "Error" or "Conflict" status in the Intune device report
Cause: Another policy (a second ASR profile, a legacy configuration profile, or a GPO/local setting) is targeting the same ASR rule with a different value, or Microsoft Defender Antivirus is disabled/replaced by a third-party AV on the device.
Open the policy's Device status report and select the failing device to view the per-setting error. Consolidate ASR rule configuration into a single Intune policy so no two profiles set the same rule differently, and confirm Microsoft Defender Antivirus is the active antivirus (ASR rules and Controlled folder access require Defender AV in active mode). Remove or reconcile any conflicting GPO before re-syncing the device.
A legitimate line-of-business application is being blocked after enabling Controlled folder access
Cause: Controlled folder access blocks untrusted apps from writing to protected folders by default, and the app has not been added to the allowed list.
In the policy, add the app's full executable path (or signed binary) to the Controlled folder access - allowed applications list. To find what was blocked, review the events on the device (Windows Security > Virus & threat protection > Ransomware protection > Block history) or run in Audit mode first to identify apps before switching to Enabled.
The policy never reaches the device or stays "Pending"
Cause: The device has not checked in with Intune, is not a member of the assigned Entra ID group, or is not properly enrolled/compliant.
Confirm the device is enrolled and is a member of the assigned group. Force a sync from Settings > Accounts > Access work or school > Info > Sync on the device, or trigger a sync from the device record in Intune. Allow time for the next check-in; membership changes in dynamic groups can also take time to evaluate.
Get-MpPreference does not show the expected ASR rule IDs or Controlled folder access is Off
Cause: The policy has not yet applied, Defender AV is not the active AV, or Tamper Protection or another security product is interfering.
Re-run Get-MpPreference and inspect AttackSurfaceReductionRules_Ids, AttackSurfaceReductionRules_Actions, and EnableControlledFolderAccess after confirming the policy status is succeeded in Intune. Verify Defender AV is in active mode (Get-MpComputerStatus) and sync the device again before re-checking.
Frequently asked questions
Do I need Microsoft Defender for Endpoint to use ASR rules in Intune?
No. Attack surface reduction rules and Controlled folder access are features of Microsoft Defender Antivirus, so they work on Intune-managed Windows devices with Defender AV in active mode. Microsoft Defender for Endpoint is not required to enforce the rules, but it significantly improves reporting, alerting, and the ability to investigate ASR events centrally.
What is the difference between Block and Audit mode for ASR rules?
In Block mode the rule actively stops the matched behavior and prevents the action from completing. In Audit mode the rule only logs an event that shows what would have been blocked, without interrupting the user — making it the safest way to measure impact before enforcing.
Which ASR rules protect against ransomware?
The most directly relevant rule is "Use advanced protection against ransomware," supported by rules that block credential stealing, block Office applications from creating child processes, and block executable content from email and scripts. Combined with Controlled folder access, these rules disrupt common ransomware execution and propagation techniques.
Why are trusted applications being blocked by Controlled Folder Access?
Controlled folder access blocks any app it does not recognize as trusted from writing to protected folders, which can catch legitimate line-of-business software. Add the application to the allowed applications list in the policy, and run the feature in Audit mode first to identify which apps need to be allowed before enforcing.
How long does it take for an Intune ransomware protection policy to apply?
Devices receive the policy on their next Intune check-in, which typically happens within a few hours but can be faster if you trigger a manual sync from the device or the Intune console. Timing also depends on Entra ID group membership evaluation for the assigned group.
Can I use these settings on devices that aren't fully managed by Intune?
Intune delivers these policies to enrolled, managed Windows devices. For devices that aren't Intune-managed, the same ASR rules and Controlled folder access can be configured through Group Policy, PowerShell, or Microsoft Defender for Endpoint, but they fall outside the Intune workflow described here.






