Forum Discussion

drivesafely's avatar
drivesafely
Brass Contributor
Nov 02, 2024

MDE disable or uninstall

Hello All, We have onboarded devices to MDE in a setup as follows, 1. Onboard devices to Entra as hybrid entra joined devices 2. Sync/Enroll devices to Intune from on-premise SCCM through co-manag...
  • Alikoc's avatar
    Nov 02, 2024

    Hello,
    In your setup, where devices are onboarded to Microsoft Defender for Endpoint (MDE) through Intune, there are specific steps for temporarily disabling Defender for Endpoint (DFE) and for offboarding or uninstall.
    To temporarily disable DFE on a device, follow these steps:
    Using Intune Device Configuration Profiles:

    Instead of stopping services directly on the device (as Intune policies may re-enable them), you can create a Device Configuration profile in Intune to temporarily adjust certain settings for troubleshooting purposes.
    For example, you can disable real-time protection or cloud-delivered protection, which is often sufficient for troubleshooting.
    In Intune, go to Endpoint security > Antivirus, and create a policy to modify Microsoft Defender Antivirus settings.
    Using PowerShell for Short-Term Disabling on a Single Device:

    If you have administrative access to the device, you can temporarily disable real-time protection using PowerShell:
    Set-MpPreference -DisableRealtimeMonitoring $true
    Keep in mind that this setting might be reset if Intune re-applies its policies, so this is best used for short-term troubleshooting only.

    Uninstalling or Offboarding Defender for Endpoint (DFE)

    If you need to completely remove DFE from a device, you can either offboard the device or uninstall Defender for Endpoint.

    Offboarding the Device via Intune

    Offboarding a device will stop it from being monitored by Defender for Endpoint, and all applied policies will be removed. Here’s how to offboard via Intune:

    1. Download the Offboarding Script:

      • Log in to the Microsoft 365 Defender portal and go to Settings > Endpoints > Onboarding.
      • Select your OS (e.g., Windows 10/11), then download the offboarding package.
      • This package includes a script that you can deploy through Intune to offboard the device.
    2. Deploy the Offboarding Script via Intune:

      • In Intune, go to Devices > Scripts and create a new Windows script.
      • Upload the downloaded offboarding script and assign it to the devices you wish to offboard.
      • Once the script runs, the devices will be offboarded from MDE, and all associated policies will be removed.

    Note: Offboarding a device from Defender for Endpoint immediately removes all monitoring and policies associated with it. Use this only on devices you intend to permanently remove from MDE.

Resources