Skip to content
Export guide · Endpoint

How to export your Microsoft Defender Antivirus settings (one Windows device) configuration, and what we check in it

Where you run it: Windows PowerShell, opened with Run as administrator, on the one Windows device whose Microsoft Defender Antivirus settings you want reviewed.

In short

Microsoft Defender Antivirus settings configuration export: the file Microsoft Defender Antivirus settings writes of its own settings, which a configuration review reads setting by setting without connecting to Microsoft Defender Antivirus settings.

How to export the Microsoft Defender Antivirus settings configuration, what the review checks in the file, and what it does not read.

The fileJSON, one mde.json per device (UTF-8): { "MpPreference": { … }, "MpComputerStatus": { … } }, the two answers as the cmdlets return them
Checks run on it20
Highest grade its findings reachPROVEN
Feeds attack pathsYes
Not read from this export2 areas, listed below

Sources: Microsoft Defender Antivirus settings documentation (1); Microsoft Defender Antivirus settings documentation (2); the vendor table.

How to export it

Who can pull it
A local administrator on the device, with Windows PowerShell opened with Run as administrator. Microsoft says of the Microsoft Defender Antivirus cmdlets: "You may need to open PowerShell in administrator mode." If your organization turned on HideExclusionsFromLocalAdmins, "local admins will no longer be able to see the exclusion list in Windows Security App or via PowerShell": the file then shows no exclusions although they still apply on the device.
Time
About 5 minutes per device.
The file
JSON, one mde.json per device (UTF-8): { "MpPreference": { … }, "MpComputerStatus": { … } }, the two answers as the cmdlets return them

No console export: These steps do not use the Microsoft Defender portal: they read the settings on the device itself with PowerShell. Intune can save an antivirus policy’s exclusion list to a .csv file ("To save the current list of exclusions to a .csv file, select Export"), which the review does not read.

From the command line

  1. $p = Get-MpPreference; $s = Get-MpComputerStatus(the two cmdlets get this device’s Microsoft Defender Antivirus preferences and status)

    The vendor's page, checked 2026-11-11
  2. @{ MpPreference = ($p | Select-Object * -ExcludeProperty Cim*, PSComputerName); MpComputerStatus = ($s | Select-Object * -ExcludeProperty Cim*, PSComputerName) } | ConvertTo-Json -Depth 4 | Out-File -Encoding utf8 (Join-Path ([Environment]::GetFolderPath('Desktop')) 'mde.json')(mde.json is saved on the Desktop of the account PowerShell runs as)

    The vendor's page, checked 2026-11-11

What the file looks like

JSON, one mde.json per device (UTF-8): { "MpPreference": { … }, "MpComputerStatus": { … } }, the two answers as the cmdlets return them. A few KB to tens of KB, with the number of exclusions and attack surface reduction rules on the device: Microsoft documents no size. The upload takes files up to 10 MB.

What it holds: The Microsoft Defender Antivirus settings that one Windows device reports about itself, as Get-MpPreference and Get-MpComputerStatus return them: not the Microsoft Defender for Endpoint service and not your tenant’s policy.

This file holds the Microsoft Defender Antivirus settings of the one Windows device the commands run on, as the two cmdlets return them, under Microsoft’s own property names (DisableRealtimeMonitoring, MAPSReporting, CloudBlockLevel, PUAProtection, EnableNetworkProtection, ExclusionPath, AttackSurfaceReductionRules_Actions, IsTamperProtected, RealTimeProtectionEnabled and the rest). It is not an export from the Microsoft Defender for Endpoint service or of your tenant’s policy, and it says nothing about other devices. If your organization turned on HideExclusionsFromLocalAdmins, the file does not show the device’s exclusions although they still apply (Microsoft: they "will not be visible via the Defender manageability tools like Get-MpPreference"). If Run as administrator asked for a separate admin account, mde.json is on that account’s Desktop: to upload it from your own account, in the same window run Copy-Item (Join-Path ([Environment]::GetFolderPath('Desktop')) 'mde.json') C:\Users\<your user name>\Downloads\ and upload it from your Downloads folder.

Afterwards

Delete mde.json from the Desktop of the account PowerShell ran as, and from your Downloads folder if you copied it there. The steps created nothing else on the device, so there is nothing to revoke or put back.

If the export goes wrong

What you seeThe fix
mde.json shows no exclusions although the device has someRun the two steps in Windows PowerShell opened with Run as administrator (Microsoft: "You may need to open PowerShell in administrator mode."). If your organization turned on HideExclusionsFromLocalAdmins, Microsoft says "local admins will no longer be able to see the exclusion list in Windows Security App or via PowerShell": the exclusions still apply on the device, but they are not in the file and are not reviewed.
Windows PowerShell does not know the command Get-MpPreferenceRun the steps on a Windows device that runs Microsoft Defender Antivirus: Get-MpPreference and Get-MpComputerStatus belong to the Defender module, and Microsoft lists Windows as the supported operating system for these cmdlets.
The upload refuses mde.json as UTF-16, or says it is not valid JSONWrite the file with the last step exactly as shown (… | ConvertTo-Json -Depth 4 | Out-File -Encoding utf8 (Join-Path ([Environment]::GetFolderPath('Desktop')) 'mde.json')): without -Encoding utf8, Out-File in Windows PowerShell 5.1 writes UTF-16, which the upload refuses.

What we read from it

Checks run
20 + 2 guidance items, not counted
Formats read
Security baseline JSON (Intune or PowerShell export) · Get-MpPreference and Get-MpComputerStatus answers (JSON)
Releases
2024.1 to current

Checks run is the number of checks that reached a result on this system's own export in our tests, as the vendor table shows it.

The areas checked

  • Whether on-access protection is on (RealTimeProtectionEnabled, DisableRealtimeMonitoring), and tamper protection (IsTamperProtected)
  • Cloud-delivered protection: MAPSReporting, CloudBlockLevel, CloudExtendedTimeout, SubmitSamplesConsent and block at first sight
  • Behavior monitoring, potentially unwanted application (PUA) protection, network protection and controlled folder access
  • Whether archives and removable drives are checked (DisableArchiveScanning, DisableRemovableDriveScanning), the scheduled day (ScanScheduleDay) and the signature update interval
  • Exclusion paths that cover a whole drive, every file or a whole user profile
  • Attack surface reduction rules: how many block, and how many audit

The grade its findings reach

Proven A finding from this file can reach PROVEN: the stored file is read a second time by a separate reader, and the finding is found at the setting it names.

Its findings feed attack paths: each one can be a step on a path an attacker could take to your crown jewels.

Attack paths, the one change and dollar figures are MODELED. How each grade is worked out is on the method page.

What we do not read from this export

  • Other devices: one device per file
  • The Microsoft Defender for Endpoint service and portal (device groups, automation level, live response, indicators, alert notifications, EDR in block mode): not in this file
  • SmartScreen, exploit protection, AppLocker and Windows Defender Application Control: not in these two answers
  • Which policy (Intune, Group Policy or a local setting) set each value
  • The device’s exclusions, when HideExclusionsFromLocalAdmins hides them
  • Tamper attempts and alerts in the Microsoft Defender portal

Limits of the reader

  • Findings name the setting they come from, not its line number.
  • The checks of this system are not counted: a check counts once a test shows it firing on a file in the layout the vendor documents.

A finding never comes from what the file does not hold: live traffic, running hosts and logs are not in a configuration export.

Questions

Who can export the Microsoft Defender Antivirus settings (one Windows device) configuration?

A local administrator on the device, with Windows PowerShell opened with Run as administrator. Microsoft says of the Microsoft Defender Antivirus cmdlets: "You may need to open PowerShell in administrator mode." If your organization turned on HideExclusionsFromLocalAdmins, "local admins will no longer be able to see the exclusion list in Windows Security App or via PowerShell": the file then shows no exclusions although they still apply on the device.

Does the export change anything?

Nothing on the device except one file: the last step writes mde.json to the Desktop of the account PowerShell runs as. Microsoft’s pages describe both cmdlets as getting, not setting: Get-MpComputerStatus "gets the status of antimalware software installed on the computer".

Does the file hold passwords or keys?

No passwords or keys. The file holds the device’s Microsoft Defender Antivirus preferences and status as the cmdlets return them, in clear text: its exclusions (paths, file extensions, process names), its attack surface reduction rule IDs and actions, product and signature versions, and the ComputerID Microsoft’s cloud service gave it. Treat the file as confidential. With redaction on (the default), the passwords, keys and tokens the review recognises are replaced with a placeholder before anything is stored; the check before upload shows how many it found.