Skip to main content
COSMICBYTEZLABS
NewsSecurityHOWTOsToolsStudyTraining
ProjectsChecklistsAI RankingsNewsletterStatusTagsAbout
Subscribe

Press Enter to search or Esc to close

News
Security
HOWTOs
Tools
Study
Training
Projects
Checklists
AI Rankings
Newsletter
Status
Tags
About
RSS Feed
Reading List
Subscribe

Stay in the Loop

Get the latest security alerts, tutorials, and tech insights delivered to your inbox.

Subscribe NowFree forever. No spam.
COSMICBYTEZLABS

Your trusted source for IT intelligence, cybersecurity insights, and hands-on technical guides.

429+ Articles
114+ Guides

CONTENT

  • Latest News
  • Security Alerts
  • HOWTOs
  • Projects
  • Exam Prep

RESOURCES

  • Search
  • Browse Tags
  • Newsletter Archive
  • Reading List
  • RSS Feed

COMPANY

  • About Us
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CosmicBytez Labs. All rights reserved.

System Status: Operational
  1. Home
  2. HOWTOs
  3. Microsoft Defender for Endpoint: Configuration and
Microsoft Defender for Endpoint: Configuration and
HOWTOIntermediate

Microsoft Defender for Endpoint: Configuration and

Deploy and configure Microsoft Defender for Endpoint. Covers onboarding methods, ASR rules, network protection, EDR in block mode, and automated investigation.

Dylan H.

Security Engineering

February 3, 2026
14 min read

Prerequisites

  • Microsoft Defender for Endpoint P1 or P2 license
  • Microsoft Intune for device management
  • Windows 10/11 Enterprise or Windows Server 2016+
  • Security Administrator role

Overview

Microsoft Defender for Endpoint (MDE) is an enterprise endpoint security platform that prevents, detects, investigates, and responds to advanced threats. It integrates with Microsoft 365 Defender to provide unified XDR capabilities across endpoints, identity, email, and cloud apps.

Who Should Use This Guide:

  • Security engineers deploying endpoint protection
  • IT administrators managing Windows devices
  • SOC analysts configuring detection capabilities
  • Organizations replacing third-party EDR solutions

Defender for Endpoint Capabilities:

CapabilityDescription
Threat & Vulnerability ManagementDiscover vulnerabilities and misconfigurations
Attack Surface ReductionBlock attack techniques with ASR rules
Next-Generation ProtectionCloud-delivered AV protection
Endpoint Detection & ResponseBehavioral detection and investigation
Automated InvestigationAuto-remediate threats
Microsoft Threat ExpertsManaged threat hunting service

Plan Comparison:

FeaturePlan 1Plan 2
Next-gen protection✓✓
Attack surface reduction✓✓
Device control✓✓
Endpoint firewall✓✓
Network protection✓✓
EDRLimited✓
TVM-✓
Automated investigation-✓
Threat analytics-✓
Sandbox-✓

Requirements

Licensing:

LicenseIncludes MDE
Microsoft 365 E5Plan 2
Microsoft 365 E5 SecurityPlan 2
Microsoft Defender for Endpoint P2Plan 2
Microsoft 365 E3Plan 1 (add-on)
Microsoft Defender for Endpoint P1Plan 1

System Requirements:

PlatformMinimum Version
Windows 101709 (RS3) or later
Windows 11All versions
Windows Server2016, 2019, 2022
macOS11 (Big Sur) or later
LinuxSee supported distros
iOS/AndroidLatest versions

Network Requirements:

EndpointPurpose
*.securitycenter.windows.comSecurity Center
*.wdcp.microsoft.comCloud protection
*.wd.microsoft.comDefender updates
*.smartscreen.microsoft.comSmartScreen
*.events.data.microsoft.comTelemetry

Architecture

┌─────────────────────────────────────────────────────────────────┐
│              Microsoft Defender for Endpoint                     │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│  ┌──────────────┐                    ┌───────────────────────┐  │
│  │   Endpoints  │                    │ Microsoft 365 Defender│  │
│  │              │                    │       Portal          │  │
│  │  ┌────────┐  │                    │ ┌───────────────────┐ │  │
│  │  │Windows │  │    ┌─────────┐     │ │ Incidents & Alerts│ │  │
│  │  │ 10/11  │──┼───▶│  Cloud  │────▶│ ├───────────────────┤ │  │
│  │  └────────┘  │    │ Service │     │ │    Device List    │ │  │
│  │  ┌────────┐  │    └─────────┘     │ ├───────────────────┤ │  │
│  │  │ macOS  │──┤                    │ │   Threat & Vuln   │ │  │
│  │  └────────┘  │                    │ ├───────────────────┤ │  │
│  │  ┌────────┐  │                    │ │  Advanced Hunting │ │  │
│  │  │ Linux  │──┤                    │ └───────────────────┘ │  │
│  │  └────────┘  │                    └───────────────────────┘  │
│  │  ┌────────┐  │                                               │
│  │  │Server  │──┘                    ┌───────────────────────┐  │
│  │  │2016+   │                       │      Intune MDM       │  │
│  │  └────────┘                       │    Configuration      │  │
│  └──────────────┘                    └───────────────────────┘  │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘

Process

Step 1: Enable Defender for Endpoint Service

Activate MDE in your Microsoft 365 tenant.

Navigate to: Microsoft 365 Defender portal (security.microsoft.com)

Initial Setup:

  1. Go to Settings → Endpoints → Onboarding
  2. Accept the Microsoft Defender for Endpoint license terms
  3. Select data storage location (cannot be changed later):
    • US
    • EU
    • UK
  4. Click Continue to provision the service

Configure General Settings:

Navigate to: Settings → Endpoints → General

SettingRecommended Value
Preview featuresOn (for latest protection)
Automated investigationSemi-automated (recommended)
Share endpoint alerts with Microsoft Compliance CenterOn

Verification: Service status shows "Active" in Settings → Endpoints.


Step 2: Configure Onboarding via Intune

Deploy MDE sensor to Windows devices using Microsoft Intune.

Create Onboarding Configuration Profile:

  1. Navigate to Microsoft Intune admin center
  2. Go to Endpoint security → Endpoint detection and response
  3. Click Create policy
  4. Select:
    • Platform: Windows 10 and later
    • Profile type: Endpoint detection and response

Configure Settings:

SettingValue
Microsoft Defender for Endpoint client configuration package typeAuto from connector
Sample sharingAll (recommended) or None
Expedite telemetry reporting frequencyEnable

Assignments:

  • Assign to All devices or target security groups
  • Exclude any devices that shouldn't be onboarded

Alternative: Manual Onboarding Package:

  1. Navigate to security.microsoft.com → Settings → Endpoints → Onboarding
  2. Select deployment method:
    • Group Policy
    • Microsoft Endpoint Configuration Manager
    • Local script
    • VDI onboarding scripts
  3. Download the package
  4. Deploy via your chosen method

PowerShell Onboarding (Local Script):

# Download onboarding script from portal, then run:
.\WindowsDefenderATPLocalOnboardingScript.cmd
 
# Verify onboarding
Get-MpComputerStatus | Select-Object AMRunningMode, OnboardingState

Step 3: Configure Attack Surface Reduction Rules

ASR rules block common attack techniques at the endpoint level.

Navigate to: Intune → Endpoint security → Attack surface reduction

Create ASR Policy:

  1. Click Create policy
  2. Select:
    • Platform: Windows 10 and later
    • Profile: Attack Surface Reduction Rules

Recommended ASR Rules (Audit First):

RuleGUIDDescription
Block executable content from emailBE9BA2D9-53EA-4CDC-84E5-9B1EEEE46550Block attachments from running
Block Office apps from creating child processesD4F940AB-401B-4EFC-AADC-AD5F3C50688APrevent Office from spawning cmd/PowerShell
Block Office apps from creating executable content3B576869-A4EC-4529-8536-B80A7769E899Prevent macros from dropping files
Block JavaScript or VBScript from launching downloaded contentD3E037E1-3EB8-44C8-A917-57927947596DBlock script-based downloads
Block execution of potentially obfuscated scripts5BEB7EFE-FD9A-4556-801D-275E5FFC04CCBlock encoded PowerShell
Block Win32 API calls from Office macros92E97FA1-2EDF-4476-BDD6-9DD0B4DDDC7BBlock macro-based exploitation
Block credential stealing from LSASS9E6C4E1F-7D60-472F-BA1A-A39EF669E4B2Protect credentials
Block untrusted/unsigned processes from USBB2B3F03D-6A65-4F7B-A9C7-1C7EF74A9BA4Block USB-based attacks
Block process creations from PSExec/WMID1E49AAC-8F56-4280-B9BA-993A6D77406CBlock lateral movement tools

Implementation Strategy:

PhaseModeDuration
1Audit2 weeks
2Warn1 week
3BlockOngoing

PowerShell Configuration:

# Set ASR rules to Audit mode
$rules = @{
    "BE9BA2D9-53EA-4CDC-84E5-9B1EEEE46550" = 2  # Audit
    "D4F940AB-401B-4EFC-AADC-AD5F3C50688A" = 2
    "3B576869-A4EC-4529-8536-B80A7769E899" = 2
    "D3E037E1-3EB8-44C8-A917-57927947596D" = 2
}
 
foreach ($rule in $rules.GetEnumerator()) {
    Add-MpPreference -AttackSurfaceReductionRules_Ids $rule.Key -AttackSurfaceReductionRules_Actions $rule.Value
}
 
# View current ASR configuration
Get-MpPreference | Select-Object -ExpandProperty AttackSurfaceReductionRules_Ids

Step 4: Configure Network Protection

Block connections to malicious domains and IP addresses.

Navigate to: Intune → Endpoint security → Attack surface reduction

Create Network Protection Policy:

  1. Click Create policy
  2. Select profile: Device control or use Settings Catalog
  3. Configure:
    • Enable network protection: Enabled (Block mode)

Settings Catalog Configuration:

  1. Go to Devices → Configuration profiles → Create profile
  2. Select Settings catalog
  3. Add: Defender → Enable Network Protection
  4. Set to: Enabled (block mode) or Audit mode

Group Policy Alternative:

Computer Configuration → Administrative Templates →
Windows Components → Microsoft Defender Antivirus →
Microsoft Defender Exploit Guard → Network Protection
 
Enable Network Protection: Enabled
Mode: Block (or Audit)

PowerShell Configuration:

# Enable Network Protection in Block mode
Set-MpPreference -EnableNetworkProtection Enabled
 
# Enable in Audit mode first
Set-MpPreference -EnableNetworkProtection AuditMode
 
# Verify status
Get-MpPreference | Select-Object EnableNetworkProtection

Step 5: Configure Web Content Filtering

Block access to malicious or inappropriate web categories.

Navigate to: security.microsoft.com → Settings → Endpoints → Web content filtering

Create Web Content Filtering Policy:

  1. Click + Add policy
  2. Configure:
    • Policy name: Block-Malicious-Categories
    • Categories to block:
CategoryBlock Reason
MalwareActive threats
PhishingCredential theft
Newly registered domainsPotential threats
SpamLow-quality content
Illegal activitiesCompliance
High-risk categoriesRisk reduction

Assign to Device Groups:

  • Select target device groups
  • Or apply to all devices

PowerShell Alternative:

# Web Content Filtering requires Defender for Endpoint Plan 2
# Configuration is done through the security portal
 
# Verify SmartScreen is enabled
Get-MpPreference | Select-Object *SmartScreen*

Step 6: Enable EDR in Block Mode

EDR in Block Mode provides post-breach protection even when Microsoft Defender AV isn't the primary AV.

Requirements:

  • Defender for Endpoint Plan 2
  • Windows 10 1903+ or Windows Server 2016+
  • Defender AV in passive mode (non-primary AV) or active mode

Enable via Settings:

  1. Navigate to security.microsoft.com → Settings → Endpoints
  2. Go to General → Advanced features
  3. Enable: EDR in block mode

What EDR Block Mode Does:

DetectionWithout Block ModeWith Block Mode
Malicious file detectedAlert onlyAlert + Block
Suspicious behaviorAlert onlyAlert + Block
Living-off-the-land attackAlert onlyAlert + Block

Verify EDR Block Mode:

# Check if EDR block mode is active
Get-MpComputerStatus | Select-Object AMRunningMode, IsTamperProtected
 
# Review blocked threats
Get-MpThreat | Where-Object {$_.ThreatStatusID -eq 1}

Step 7: Configure Automated Investigation and Response

Enable automated remediation for detected threats.

Navigate to: security.microsoft.com → Settings → Endpoints → General

Configure Automation Settings:

SettingRecommended Value
Automated InvestigationOn
Automation levelSemi-automated
Auto-resolve alertsFor low-medium severity

Automation Levels:

LevelDescription
No automationManual investigation only
Semi-automated (default)Requires approval for remediation
Full automationAuto-remediate without approval

Create Device Groups with Automation:

  1. Go to Settings → Endpoints → Device groups
  2. Create group with automation level:
Group name: High-Value-Servers
Automation level: Semi-automated
Matching rules:
  - Tag: HighValue
  - OR Device name contains: SRV

Review Automated Investigations:

Navigate to: Incidents & alerts → Automated investigations


Step 8: Configure Custom Detection Rules

Create custom detection rules using KQL queries.

Navigate to: security.microsoft.com → Hunting → Custom detection rules

Create Custom Detection:

  1. Click + New detection rule
  2. Write KQL query:
// Detect PowerShell with encoded commands
DeviceProcessEvents
| where FileName =~ "powershell.exe"
| where ProcessCommandLine has_any ("-enc", "-encodedcommand", "-e ", "-ec ")
| project Timestamp, DeviceName, InitiatingProcessFileName, ProcessCommandLine

Configure Rule Settings:

SettingValue
Alert titleEncoded PowerShell Execution Detected
SeverityMedium
CategoryExecution
MITRE techniqueT1059.001
Recommended actionsInvestigate process tree
FrequencyEvery hour

Example Detection Queries:

// Detect LSASS credential access
DeviceProcessEvents
| where FileName in~ ("procdump.exe", "mimikatz.exe", "comsvcs.dll")
    or ProcessCommandLine has "sekurlsa"
    or ProcessCommandLine has "lsass"
 
// Detect suspicious WMI activity
DeviceProcessEvents
| where InitiatingProcessFileName =~ "wmiprvse.exe"
| where FileName in~ ("powershell.exe", "cmd.exe")
| project Timestamp, DeviceName, ProcessCommandLine

Step 9: Configure Exclusions

Add necessary exclusions for business applications.

Navigate to: Intune → Endpoint security → Antivirus

Create Antivirus Exclusion Policy:

  1. Click Create policy
  2. Select Microsoft Defender Antivirus exclusions

Common Exclusions:

ApplicationExclusion TypePath/Process
SQL ServerPath%ProgramFiles%\Microsoft SQL Server\
ExchangePath/ProcessMultiple paths - see MS docs
SharePointPath%ProgramFiles%\Microsoft Office Servers\
Backup softwareProcessBackupExec.exe, veeam*.exe
Dev toolsPath%LocalAppData%\Packages\

Important: Minimize exclusions to reduce attack surface.

PowerShell Exclusion Management:

# Add path exclusion
Add-MpPreference -ExclusionPath "C:\CustomApp\Data"
 
# Add process exclusion
Add-MpPreference -ExclusionProcess "CustomApp.exe"
 
# Add extension exclusion (use sparingly)
Add-MpPreference -ExclusionExtension ".log"
 
# View current exclusions
Get-MpPreference | Select-Object Exclusion*

Step 10: Verify Onboarding and Test Detection

Confirm devices are properly protected and detections work.

Verify Device Onboarding:

# Check MDE sensor status
Get-MpComputerStatus | Select-Object AMServiceEnabled, AntispywareEnabled,
    OnboardingState, RealTimeProtectionEnabled
 
# Verify connectivity
Test-NetConnection -ComputerName wdcp.microsoft.com -Port 443
Test-NetConnection -ComputerName events.data.microsoft.com -Port 443

Run EICAR Test File:

# Download EICAR test file (will be detected and blocked)
Invoke-WebRequest -Uri "https://www.eicar.org/download/eicar.com.txt" -OutFile "C:\Test\eicar.com"
 
# This should trigger a detection in the portal

Run MDE Detection Test:

# Official MDE detection test command
# This generates a benign alert in the portal
powershell.exe -NoExit -ExecutionPolicy Bypass -WindowStyle Hidden $ErrorActionPreference= 'silentlycontinue';(New-Object System.Net.WebClient).DownloadFile('http://127.0.0.1/1.exe', 'C:\\test-WDATP-test\\invoice.exe');Start-Process 'C:\\test-WDATP-test\\invoice.exe'

Portal Verification:

  1. Navigate to security.microsoft.com → Assets → Devices
  2. Find test device
  3. Verify:
    • Onboarding status: Onboarded
    • Sensor health: Active
    • Risk level: Low (after test)

Troubleshooting

Common Issues:

SymptomPossible CauseSolution
Device not onboardedConnectivity issuesVerify network requirements; check proxy
Sensor not runningService disabledStart "Sense" service; check WD state
No alerts generatingDetection disabledVerify cloud protection enabled
ASR causing app issuesRule blocking legitimate appAdd exclusion for specific app/path
High resource usageScan settings too aggressiveAdjust scan schedule; add exclusions

Diagnostic Commands:

# Check Defender service status
Get-Service WinDefend, Sense
 
# Run Defender connectivity test
& "C:\Program Files\Windows Defender\MpCmdRun.exe" -ValidateMapsConnection
 
# Check cloud protection status
Get-MpComputerStatus | Select-Object *Cloud*, *Map*
 
# View recent Defender events
Get-WinEvent -LogName "Microsoft-Windows-Windows Defender/Operational" -MaxEvents 20
 
# Generate MDE client analyzer report
& "C:\Program Files\Windows Defender\MpCmdRun.exe" -GetFiles

Collect Diagnostic Package:

# Create diagnostic package for support
& "C:\Program Files\Windows Defender\MpCmdRun.exe" -GetFiles
# Output: C:\ProgramData\Microsoft\Windows Defender\Support\MpSupportFiles.cab

Security Considerations

Tamper Protection:

Enable tamper protection to prevent unauthorized changes:

  1. Navigate to security.microsoft.com → Settings → Endpoints
  2. Enable: Tamper protection

Cloud Protection Level:

LevelDescription
DefaultStandard cloud lookup
HighAggressive blocking; may impact performance
High+High + additional protection measures
Zero toleranceBlock all suspicious files

Recommended Baseline:

# Set cloud protection to High
Set-MpPreference -CloudBlockLevel High
 
# Set cloud extended timeout
Set-MpPreference -CloudExtendedTimeout 50
 
# Enable all protection features
Set-MpPreference -DisableRealtimeMonitoring $false
Set-MpPreference -DisableBehaviorMonitoring $false
Set-MpPreference -DisableIOAVProtection $false
Set-MpPreference -DisableScriptScanning $false

Verification Checklist

Onboarding:

  • MDE service activated in tenant
  • Onboarding policy deployed via Intune
  • Test device shows as onboarded
  • Sensor health shows "Active"

Protection Configuration:

  • Real-time protection enabled
  • Cloud protection enabled (High level)
  • ASR rules configured (audit mode initially)
  • Network protection enabled
  • EDR in Block mode enabled

Detection Testing:

  • EICAR test file detected
  • MDE test alert generated
  • Custom detection rules created
  • Automated investigation configured

Operations:

  • Device groups configured
  • Alert notifications configured
  • Exclusions documented and minimal
  • SOC team trained on portal

Next Steps

After deploying Defender for Endpoint:

  1. Integrate with Microsoft Sentinel - Centralized SIEM analysis
  2. Enable Threat Analytics - Threat intelligence reports
  3. Configure Attack Simulations - Test detection capabilities
  4. Deploy to macOS/Linux - Cross-platform protection

References

  • Microsoft Defender for Endpoint Documentation
  • Attack Surface Reduction Rules Reference
  • Advanced Hunting Queries
  • Network Requirements

Last Updated: February 2026

#Microsoft Defender#Endpoint Security#Intune#Security Baselines#edr#XDR

Related Articles

SentinelOne Agent Deployment: EDR Installation and

Deploy and manage SentinelOne EDR agents across your environment. Covers manual installation, verification, troubleshooting, and best practices.

8 min read

How to Deploy Wazuh SIEM/XDR for Unified Security Monitoring

Step-by-step guide to deploying Wazuh as an open-source SIEM and XDR platform. Covers server installation, agent deployment across Windows and Linux,...

13 min read

How to Detect and Block ClickFix Attacks

Learn how to detect and prevent ClickFix social engineering attacks using EDR rules, network monitoring, YARA signatures, and endpoint hardening. Covers...

14 min read
Back to all HOWTOs