Anavem
Languagefr
How to Block Executable Content from Email Clients Using Microsoft Intune

How to Block Executable Content from Email Clients Using Microsoft Intune

Configure Microsoft Defender Attack Surface Reduction rules through Intune to prevent malicious executable files and scripts from running directly from email attachments across enterprise devices.

April 22, 2026 15 min
hardmicrosoft-intune 10 steps 15 min

Why Block Executable Content from Email Clients?

Email remains one of the most common attack vectors for malware delivery, with cybercriminals frequently using executable attachments to compromise enterprise environments. Traditional email security solutions may miss sophisticated threats or allow users to bypass warnings, making endpoint-level protection crucial for comprehensive defense.

How Does Microsoft Defender Attack Surface Reduction Help?

Microsoft Defender's Attack Surface Reduction (ASR) rules provide granular control over potentially dangerous behaviors at the endpoint level. The "Block executable content from email client and webmail" rule specifically targets executable files and scripts that users attempt to run directly from email attachments, preventing a significant category of malware infections before they can establish persistence.

What Will You Accomplish with This Configuration?

By implementing this ASR rule through Microsoft Intune, you'll establish enterprise-wide protection that prevents users from executing potentially malicious files directly from email clients like Outlook, Thunderbird, or webmail interfaces. The rule operates transparently to users while providing comprehensive logging and monitoring capabilities through the Microsoft Defender portal. You'll learn to deploy the rule safely using audit mode first, configure necessary exclusions for legitimate business applications, and monitor effectiveness across your environment.

Implementation Guide

Full Procedure

01

Access Intune Admin Center and Navigate to Endpoint Security

Start by logging into the Microsoft Intune admin center to create your Attack Surface Reduction policy.

Open your browser and navigate to https://intune.microsoft.com. Sign in with your administrative credentials that have Endpoint Security Administrator or Global Administrator permissions.

Once logged in, navigate to Endpoint security in the left navigation pane, then click Attack surface reduction.

Click Create Policy to start creating a new ASR policy.

Pro tip: Bookmark the Intune admin center URL and consider using a dedicated administrative browser profile to avoid session conflicts with personal accounts.

Verification: You should see the Attack surface reduction policy creation wizard with platform and profile type options.

02

Create New Attack Surface Reduction Policy

Configure the basic policy settings for your ASR rule deployment.

In the policy creation wizard:

  1. Select Windows 10, Windows 11, and Windows Server as the platform
  2. Choose Attack surface reduction rules as the profile type
  3. Click Create

On the Basics page:

  1. Enter a descriptive name like ASR - Block Email Executable Content
  2. Add a description: Prevents executable files and scripts from running when downloaded through email clients and webmail services
  3. Click Next

Verification: The policy name should appear in the policy list, and you should be on the Configuration settings page.

03

Configure the Email Executable Content ASR Rule

Now configure the specific ASR rule that blocks executable content from email clients.

In the Configuration settings page, locate the rule Block executable content from email client and webmail. This rule has the GUID D3E037E1-3EB8-44C8-A917-57927947596D.

Set the rule to one of these modes:

  • Audit mode - Recommended for initial deployment to identify false positives
  • Warn - Shows user notification but allows bypass
  • Block - Prevents execution entirely
  • Not configured - Rule is disabled

For initial deployment, select Audit mode. This allows you to monitor what would be blocked without impacting users.

Warning: Starting with Block mode can disrupt legitimate business processes. Always begin with Audit mode to identify false positives.

Click Next to proceed to scope tags.

Verification: The rule should show as "Audit mode" in the configuration summary.

04

Configure Scope Tags and Assignments

Set up scope tags (if used) and assign the policy to target groups.

On the Scope tags page, add any relevant scope tags for your organization's administrative boundaries, or leave blank if not using scope tags. Click Next.

On the Assignments page:

  1. Click Add groups under "Included groups"
  2. Search for and select a pilot group of devices (recommended: 10-50 devices initially)
  3. Avoid assigning to "All devices" on first deployment
  4. Click Select, then Next

Review your settings on the Review + create page and click Create.

Pro tip: Create a dedicated security group called "ASR Pilot Devices" for testing ASR rules before enterprise-wide deployment.

Verification: The policy should appear in your Attack surface reduction policies list with a status of "Pending" or "Succeeded".

05

Monitor Policy Deployment and Device Check-in

Verify that the policy deploys successfully to target devices.

In the Intune admin center, navigate to Endpoint security > Attack surface reduction and click on your newly created policy.

Click the Device status tab to monitor deployment progress. You should see devices listed with their compliance status.

To force immediate policy check-in on a test device, you can use the Company Portal app or run this PowerShell command as administrator on the target device:

Get-ScheduledTask | Where-Object {$_.TaskName -eq "PushLaunch"} | Start-ScheduledTask

Alternatively, restart the device to ensure policy application.

Verification: Device status should show "Succeeded" for target devices within 15-30 minutes of policy creation.

06

Verify ASR Rule Status on Target Devices

Confirm that the ASR rule is active on enrolled devices using PowerShell.

On a target device, open PowerShell as administrator and run:

Get-MpPreference | Select-Object -ExpandProperty AttackSurfaceReductionRules_Ids

This should return the GUID D3E037E1-3EB8-44C8-A917-57927947596D if the rule is configured.

To check the rule's current mode, run:

Get-MpPreference | Select-Object -ExpandProperty AttackSurfaceReductionRules_Actions

The output values mean:

  • 0 = Disabled
  • 1 = Block mode
  • 2 = Audit mode
  • 6 = Warn mode

Since you configured Audit mode, you should see 2 in the output.

Verification: Both commands should return the expected GUID and action value (2 for Audit mode).

07

Test the ASR Rule with Safe Email Attachment

Perform a controlled test to verify the ASR rule is functioning correctly.

Create a test scenario by sending an email with a harmless executable attachment to a user on a target device. You can use a simple batch file for testing:

@echo off
echo This is a test executable
pause

Save this as test.bat and send it as an email attachment to a test user.

When the user attempts to run the attachment directly from their email client (Outlook, Thunderbird, etc.), the ASR rule should trigger.

Since you're in Audit mode, the file will execute but an event will be logged. Check the Windows Event Viewer on the target device:

  1. Open Event Viewer
  2. Navigate to Applications and Services Logs > Microsoft > Windows > Windows Defender > Operational
  3. Look for Event ID 1122 (Audit mode trigger)

Verification: You should see Event ID 1122 with details about the blocked executable and the ASR rule GUID.

08

Monitor ASR Rule Activity in Microsoft Defender Portal

Use the Microsoft Defender portal to monitor ASR rule effectiveness across your environment.

Navigate to https://security.microsoft.com and sign in with your administrative credentials.

Go to Reports > Attack surface reduction rules in the left navigation.

Click on the Detections tab to view ASR rule triggers. You should see entries for your test and any legitimate triggers from the "Block executable content from email client and webmail" rule.

Click on the Configuration tab to see which devices have the rule enabled and their current configuration status.

Review the data for at least one week in Audit mode to identify patterns and potential false positives before switching to Block mode.

Pro tip: Export the detection data to Excel for detailed analysis of file types, paths, and frequency to make informed decisions about exclusions.

Verification: The Detections tab should show audit events from your test and any real-world triggers with detailed file information.

09

Configure Exclusions for Legitimate Applications (If Needed)

Based on your audit data, add exclusions for legitimate applications that are being incorrectly flagged.

Return to your ASR policy in the Intune admin center. Click Properties, then Edit next to Configuration settings.

Scroll down to find Attack Surface Reduction Rules Exclusions. Add file paths, folder paths, or file extensions that should be excluded from this rule.

Common exclusions might include:

  • Specific executable paths: C:\Program Files\YourApp\app.exe
  • Folder exclusions: C:\Program Files\LegitimateApp\*
  • File extensions (use cautiously): *.msi

Example exclusion configuration:

C:\Program Files\RemoteMonitoring\winagent.exe
C:\Program Files (x86)\BusinessApp\*
Warning: Avoid excluding system files like svchost.exe or broad exclusions like *.exe as these can significantly reduce security effectiveness.

Click Review + save to apply the exclusions.

Verification: Test previously blocked legitimate applications to ensure they now function correctly.

10

Switch to Block Mode and Expand Deployment

After validating the rule in Audit mode and configuring necessary exclusions, switch to Block mode for full protection.

Edit your ASR policy and change the "Block executable content from email client and webmail" rule from Audit mode to Block.

Save the policy changes. The new setting will deploy to devices within the next policy refresh cycle (typically 8 hours, or immediately with manual sync).

Once you've confirmed Block mode works correctly with your pilot group, expand the assignment:

  1. Edit the policy assignments
  2. Add larger device groups or "All devices" as appropriate
  3. Consider excluding specific groups that require different handling

Monitor the Microsoft Defender portal for Block events (Event ID 1121) to ensure the rule is working as expected.

Set up regular monitoring schedules to review ASR effectiveness and adjust exclusions as needed.

Pro tip: Create a monthly review process to analyze ASR detection reports and fine-tune exclusions based on business needs and threat landscape changes.

Verification: Event Viewer should show Event ID 1121 (Block mode) instead of 1122 (Audit mode) for new triggers, and malicious email attachments should be prevented from executing.

Frequently Asked Questions

What happens when a user tries to run an executable from email after enabling this ASR rule?+
When the rule is in Block mode, the executable is prevented from running and the user sees a notification that the action was blocked by security policy. In Audit mode, the file executes normally but the event is logged for monitoring. In Warn mode, users receive a notification but can choose to bypass the block if needed.
Can legitimate business applications be affected by the email executable content ASR rule?+
Yes, legitimate applications sent via email can be blocked by this rule. Common examples include software installers, remote monitoring agents, or business tools distributed via email. This is why starting with Audit mode is crucial to identify false positives before enabling Block mode. You can then configure specific exclusions for legitimate applications.
How long does it take for ASR rule changes to apply to devices managed by Intune?+
ASR rule policy changes typically apply within 8 hours during the normal Intune policy refresh cycle. However, you can force immediate policy application by manually syncing devices through the Company Portal app, using the PushLaunch scheduled task via PowerShell, or restarting the target devices.
What's the difference between Event ID 1121 and 1122 in Windows Defender logs?+
Event ID 1121 indicates that an ASR rule triggered in Block mode and prevented the action from completing. Event ID 1122 indicates that an ASR rule triggered in Audit mode, meaning the action was allowed to proceed but was logged for monitoring purposes. Event ID 5007 indicates that ASR rule settings have been changed on the device.
Can users bypass the ASR rule if they save the email attachment to disk first?+
No, this ASR rule specifically targets executable content launched directly from email clients and webmail interfaces. If users save attachments to disk and run them from File Explorer, this particular rule does not apply. However, other ASR rules and Microsoft Defender real-time protection would still scan and potentially block malicious files based on their content and behavior.

Discussion

Share your thoughts and insights

Sign in to join the discussion