Every new Microsoft Defender tenant starts with the same hours of clicking through the Defender portal, Intune and Exchange Online. And afterwards it is hard to prove what you actually configured.
Defender Configurator is a free, open source PowerShell 7 tool with a graphical interface that makes this onboarding repeatable. You describe your standard once as blueprints and each customer in one file. The tool reads the tenant, shows exactly where it differs, applies only what you tick and writes a before/after report for the customer file.

Download it on GitHub · MIT License
How it works
- Sign in to the customer tenant: the Defender portal, Microsoft Graph for Intune and Exchange Online for email. Each sign-in is separate, and the tenant you are working on is always shown at the top.
- Compare. Choose a blueprint, or All menus, and click Read Tenant and Compare. Every setting shows Matches, Differs or why it cannot be set (a missing licence, for example).
- Apply. Tick the settings to change. The confirmation shows the tenant and every change, with a warning where a setting has a large effect.
- Report. Save an HTML report with the changes (before and after) and the full comparison.
Blueprints and customer files
The tool separates two kinds of configuration:
- A blueprint holds what every tenant gets: your standard. There is one blueprint file per menu, and you rarely change them.
- A customer file holds what only one customer gets: their device groups, tags, accounts, domains, IP ranges and mailboxes. It can also change a blueprint value for that customer only.
Both are plain JSON files. You can keep them in version control, review a change before you use it, and reuse the same standard for every customer. Both are applied from the Blueprints menu of the tool, with the same confirmation, fresh read and read-back as every other page.
| Blueprint | Customer file | |
|---|---|---|
| Holds | Settings that fit any tenant | Items and values that belong to one customer |
| Files | One per menu, in the Blueprint folder | One per customer, in the Customers folder |
| Applied on | Apply Blueprints | Customer Settings |
| What apply does | Sets each ticked setting to the blueprint value | Adds what is missing; never removes anything |
| Kept in git | Yes | No: customer files are ignored, only the template is committed |
What a blueprint file looks like
Every setting in a blueprint has an area (the group of settings it belongs to), a name, the value it should have, and the reason. The reason is shown next to the setting in the tool and in the HTML report, so the customer sees why a setting was changed and not only what changed.
{
"menu": "Identities",
"name": "Identities blueprint",
"version": "1.0",
"description": "Defender for Identity settings for a new customer tenant.",
"settings": [
{ "area": "MdiFeatures", "name": "IsAutoWindowsAuditingEnabled", "value": true,
"reason": "Missing auditing is a common cause of health issues and missed detections." },
{ "area": "MdiFeatures", "name": "IsAutoActivationEnabled", "value": true,
"reason": "Eligible servers onboarded to Defender for Endpoint get the sensor automatically." },
{ "area": "MdiActionAccount", "name": "UseLocalSystem", "value": true,
"reason": "Response actions run as Local System, so no extra account is needed." }
]
}
Values are true or false for switches, "Standard" or "Strict" for email policies, "Off", "AllDevices" or "TaggedDevices" for the enforcement scope, a quarantine policy name for the Teams quarantine settings, and true or an object with options for Intune policies.
A blueprint deliberately holds only settings that fit any tenant. Anything that belongs to one customer, such as a device group, a domain or a mailbox, goes in a customer file instead.
The six blueprints
The tool ships with a blueprint for each menu. The values below are the ones in the files today. They are a starting point: review them against your own standard and change what you want.
Defender portal
Needs the Defender sign-in.
| Setting | Blueprint | Why |
|---|---|---|
| Preview features: Defender XDR and Defender for Identity | On | New capabilities appear as soon as Microsoft releases them in preview |
| Preview features: Defender for Endpoint | On | The same for Defender for Endpoint |
| Preview features: Defender for Cloud Apps | On | The same for Defender for Cloud Apps |
Preview features are supported but can still change, and they apply to every user of the tenant.
Endpoints
Needs the Defender sign-in. These are the Defender for Endpoint advanced features (Settings > Endpoints > Advanced features) and the enforcement scope of security settings management.
| Setting | Blueprint | Why |
|---|---|---|
| EDR in block mode | On | Blocks malicious behaviour found by EDR, also when another antivirus is the primary one |
| Automatically resolve alerts | On | Closes alerts when automated investigation finds nothing or remediates everything |
| Allow or block file | On | Required for file indicators |
| Hide potential duplicate device records | On | Keeps the device inventory free of duplicates |
| Custom network indicators | On | Required for IP, URL and domain indicators and for blocking unsanctioned cloud apps |
| Tamper protection | On | Stops attackers and local administrators from switching off Defender protection |
| Show user details | On | Shows Entra ID user details during investigations |
| Microsoft Defender for Cloud Apps | On | Sends endpoint signals to Defender for Cloud Apps; needed for Enforce app access |
| Web content filtering | On | Enables web content filtering policies and reports |
| Device discovery | On | Finds unmanaged devices on the network |
| Download quarantined files | On | Keeps quarantined files available for analysis |
| Streamlined connectivity for new onboarding | On | New onboarding packages use the consolidated Defender URL set |
| Streamlined connectivity for Intune and Defender for Cloud | On | Devices onboarded through Intune and Defender for Cloud use the consolidated URL set |
| Live response, and live response for servers | On | Analysts can open a remote shell on a device during an incident |
| Live response unsigned script execution | Off | Only signed scripts may run through live response |
| Microsoft Intune connection | On | Shares device risk with Intune for compliance and Conditional Access |
| Authenticated telemetry | On | Rejects telemetry from devices that cannot prove their identity |
| Share endpoint alerts with Microsoft Purview | On | Shares endpoint alerts with Purview for insider risk and compliance |
| Use MDE to enforce security configuration settings from Intune | On | The main switch of security settings management |
| Enforcement scope: Windows Client, Windows Server, domain controllers, Linux, macOS | Tagged devices | Only devices with the tag MDE-Management get the Intune endpoint security policies |
A few things to know about the Endpoints blueprint:
- A feature the tenant has no licence for is shown as Cannot be set instead of failing.
- With the enforcement scope on tagged devices, nothing happens on a device until it has the tag
MDE-Management. You add that tag on the Device Tags page or through a customer file.AllDevicesapplies the Intune policies to every device of a platform, and the confirmation warns you about it. - Turning the main switch on in the portal resets every platform to all devices. The tool sends the blueprint’s platform values in the same request instead, so devices are never briefly in scope by accident.
Intune
Needs the Graph sign-in. These are four Defender policies in Intune, the same ones the Defender AV, Attack Surface Reduction, Forgotten Settings and AI Agent Protection pages create.
| Policy | Blueprint | Why |
|---|---|---|
| Defender Antivirus policy Defender Antivirus - Baseline | Network protection and PUA protection in block, cloud block level High, all samples sent automatically, daily quick scan at 12:00, CPU limit 50 %, local admin exclusions ignored | Real-time, behaviour, script, email, archive and cloud-delivered protection on, in 25 settings |
| Attack surface reduction rules policy ASR Rules - Baseline | Standard, controlled folder access in audit | Microsoft’s three standard protection rules block from day one; the other rules audit until their events are reviewed |
| Forgotten Defender settings policy Defender - Forgotten Settings | File hash computation, warn verdicts converted to block, protection during Windows setup, exclusions hidden from local admins and users, excluded files in the quick scan, Intel TDT on | Defender settings the antivirus profile doesn’t show, so they are easily forgotten. A settings catalog policy (Devices > Configuration) |
| AI agent runtime protection policy AI Agent Runtime Protection - Baseline | Audit | Defender inspects supported local AI agents for prompt injection and high-risk actions. In audit mode it reports detections and blocks nothing, so you can review the events first |
The value of a policy is true for the default options, or an object with only the options you want to change:
{ "area": "IntunePolicies", "name": "DefenderAntivirus",
"value": { "NetworkProtection": "Audit", "CloudBlockLevel": "HighPlus" },
"reason": "Network protection starts in audit for the first roll-out." },
{ "area": "IntunePolicies", "name": "AsrRules",
"value": { "Mode": "Standard", "ControlledFolderAccess": "Audit" },
"reason": "Standard protection rules in block, the others in audit." },
{ "area": "IntunePolicies", "name": "ForgottenSettings",
"value": { "IntelTDTEnabled": "NotConfigured" },
"reason": "No Intel processors at this customer." },
{ "area": "IntunePolicies", "name": "AiAgentProtection",
"value": { "Mode": "Audit" },
"reason": "Review the AI agent detections before blocking." }
| Policy | Option | Values |
|---|---|---|
| Defender Antivirus | NetworkProtection, PotentiallyUnwantedApps | Block or Audit |
CloudBlockLevel | High, HighPlus or ZeroTolerance | |
SampleSubmission | SendAll or SendSafe | |
QuickScanTime | the daily quick scan, as "HH:mm" | |
CpuLimit | 5 to 100 | |
IgnoreLocalAdminExclusions | true or false | |
| ASR rules | Mode | Standard, Block (all rules) or Audit (all rules) |
ControlledFolderAccess | Audit, Block or NotConfigured | |
| Forgotten settings | EnableFileHashComputation, AllowSwitchToAsyncInspection, EnableConvertWarnToBlock, OobeEnableRtpAndSigUpdate, HideExclusionsFromLocalAdmins, HideExclusionsFromLocalUsers, QuickScanIncludeExclusions | true, false or NotConfigured |
IntelTDTEnabled | On, Off, Default or NotConfigured | |
| AI agent runtime protection | Mode | Audit or Block |
The AI agent runtime protection profile is new, so its settings aren’t written into the tool. Each time, the tool reads the template from Intune. It gives every protection method its audit option (or its block option), and also sets any main switch those methods depend on. A setting without such an option stays Not configured, and the AI Agent Protection page lists it in its preview.
The Intune blueprint works like the email policies:
- When the policy is missing, applying creates it without an assignment, so no device gets it until you assign it to a group, a pilot group first.
- When a policy with that name exists, the tool compares it setting by setting. If a setting is missing or has another value, it shows change it in Intune and names the settings. It never changes an existing policy.
- Before creating the forgotten settings policy, the tool checks every setting against Intune’s own definitions. A setting Intune doesn’t offer is left out and named.
- Exploit Protection, App and Browser Isolation and Application control are not in the blueprint, because they depend on files and choices that differ per customer. You create those on their own pages.
Identities
Needs the Defender sign-in. These are Defender for Identity settings.
| Setting | Blueprint | Why |
|---|---|---|
| Automatic Windows auditing configuration | On | Defender for Identity configures the event auditing it needs on servers with a sensor |
| Automatic sensor v3.x activation | On | Every eligible server onboarded to Defender for Endpoint gets the sensor within about an hour |
| Response actions use Local System | On | Actions such as disabling a user run as the sensor’s Local System account |
Automatic activation affects domain controllers and other eligible servers, so the confirmation warns you. Set it to false for a customer who wants to activate servers one by one.
Cloud Apps
Needs the Defender sign-in. These are Defender for Cloud Apps settings.
| Setting | Blueprint | Why |
|---|---|---|
| File monitoring | On | Needed for file policies and malware detection on files |
| Enforce app access | On | Apps marked Unsanctioned are blocked on devices onboarded to Defender for Endpoint |
| User enrichment | On | Cloud Discovery shows Entra ID user names instead of the identifiers from firewall and proxy logs |
| All Microsoft 365 connector components on | On | Without them, activity policies, file policies and many detections get no data |
| Microsoft Azure app connector enabled | On | Collects Azure activity for alerts and investigations |
Before you apply Enforce app access, check which apps are marked Unsanctioned: users lose access to them on their devices. The two connector settings only accept true, because only switching them on was recorded from the portal. A connector that doesn’t exist yet must first be connected in the portal, since that needs consent.
Email and Collaboration
Needs the Exchange sign-in, plus the Defender sign-in for MDO automation. Most settings need Defender for Office 365.
| Setting | Blueprint | Why |
|---|---|---|
| Anti-phishing policy | Standard | Spoof intelligence, DMARC handling, safety tips, and with MDO impersonation protection and mailbox intelligence |
| Anti-spam policies | Standard | Spam, bulk and phishing actions, plus an outbound policy with sending limits and external forwarding blocked |
| Anti-malware policy | Standard | Common attachments filter, zero-hour auto purge, only admins can release malware |
| Safe Attachments policy | Standard | Attachments are opened in a sandbox and malicious ones are blocked |
| Safe Links policy | Standard | Links in email, Teams and Office apps are checked when clicked |
| Safe Attachments for SharePoint, OneDrive and Teams | On | Files in SharePoint, OneDrive and Teams are checked too |
| Priority account protection | On | Extra protection and reporting for priority accounts |
| Zero-hour auto purge for Teams | On | Removes malicious Teams messages detected after delivery |
| Teams quarantine policy for malware and for high confidence phishing | AdminOnlyAccessPolicy | Only admins can release these messages |
| Users can report messages in Teams | On | Users can report suspicious Teams messages |
| Remediate similar email, URL and file clusters automatically | On | Automated investigation removes messages similar to a confirmed threat without waiting for approval |
Standard and Strict are Microsoft’s own recommended settings. A new policy applies to all accepted domains of the tenant and is turned on immediately; the confirmation lists the domains. An existing policy is never changed: when a policy with the blueprint’s name already exists with other values, the tool shows change it in the portal and leaves it alone.
Comparing and applying a blueprint
On the Apply Blueprints page you choose a menu, or All menus to load every blueprint together, so one read and one apply cover everything. After Read Tenant and Compare, every setting gets a status:
| Status | Meaning |
|---|---|
| Matches the blueprint | Nothing to do |
| Differs from the blueprint | The tool can apply the blueprint value |
| Missing: ‘…’ is created | An email or Intune policy with the blueprint’s name doesn’t exist yet; applying creates it |
| Exists with other values: change it in the portal (or in Intune) | A policy with that name exists but doesn’t have the blueprint’s values; the tool leaves it alone |
| Not read, Not available, Cannot be set | A sign-in isn’t connected, a licence is missing or the tenant doesn’t offer the setting. The reason is shown |
Open in Window shows the comparison in a large window where you can hide the settings that already match. Then you tick what to change and click Apply Selected Settings. The confirmation shows the tenant, every change, and a warning for the settings with a large effect: automatic sensor activation, the enforcement scope, Enforce app access, user enrichment, the app connectors, new email policies, new Intune policies without an assignment, and the MDO automation approver. If the Defender, Exchange and Graph sign-ins belong to different tenants, the tool refuses to apply. Afterwards, Save Report writes the HTML report for the customer file.
Changing a blueprint
- Edit a value or reason in the JSON file and click Reload.
- Remove a line to leave that setting out of the blueprint entirely.
- Save Tenant as Blueprint turns a tenant you configured by hand into a new blueprint file, which is the quickest way to capture your own standard.
- For a one-off, copy a file, change the copy and load it with Other File…. For a customer you work with regularly, a customer file with overrides is the better choice (see below).
The tool checks every file when it loads it, and lists each problem: an unknown area or setting, a wrong value type, a duplicate, or an area that belongs to another menu.
What a customer file holds
You create a customer file with New from Template… on the Customer Settings page. You fill in only what applies to that customer, and leave the rest empty.
| Section | What it holds | What applying does | Sign-in |
|---|---|---|---|
blueprintOverrides | Blueprint values this customer wants differently | Used by Apply Blueprints while this customer is chosen | |
endpoints.deviceGroups | Device groups, in the portal’s own format | Adds the groups whose name doesn’t exist yet, just above Ungrouped devices | Defender |
endpoints.deviceTags | Manual tags and the devices that get them | Adds the tag to each device that lacks it | Defender |
endpoints.deviceTagRules | Rules that tag devices automatically, also devices onboarded later | Creates the rule when no rule with that name exists | Defender |
identities.directoryServicesAccounts | Defender for Identity gMSAs | Registers the gMSA when it isn’t registered yet | Defender |
rbac.roles | Defender XDR unified RBAC roles with their Entra ID groups | Creates the role and assigns it to the groups | Graph |
cloudApps.managedDomains | The customer’s own domains | Adds the missing domains | Defender |
cloudApps.ipRanges | Named IP ranges with a category | Adds a range when no custom range with that name exists | Defender |
email.reportedMessages | Where messages reported in Outlook go | Sets the destination and the reporting mailbox | Exchange |
email.priorityAccounts | Priority accounts | Tags the missing users | Exchange |
email.impersonationProtection | Users and partner domains to protect | Adds them to the anti-phishing policy | Exchange |
email.safeLinksDoNotRewrite | URLs Safe Links must not rewrite | Adds them to the Safe Links policy | Exchange |
email.malwareAdminNotification | Who hears about malware from internal senders | Sets this admin in the anti-malware policy | Exchange |
The header and the tenant lock
"type": "DefenderConfigurator.Customer",
"version": 1,
"customer": "Contoso",
"tenantId": "00000000-0000-0000-0000-000000000000",
"description": "Contoso Belgium, onboarded November 2026",
customer is required and appears in the customer list, the reports and the reason of every override. Always fill in tenantId as well. With a tenant ID, the tool refuses to read or apply the file while you are signed in to any other tenant, on both the Customer Settings and the Apply Blueprints page. When you work for many customers, that lock is what stops you from applying one customer’s settings to another.
Overriding a blueprint value
An override uses the same area and name as the line in the blueprint file:
"blueprintOverrides": [
{ "area": "MdiFeatures", "name": "IsAutoActivationEnabled", "value": false,
"reason": "Servers are activated one by one after a change request." },
{ "area": "MdoPolicies", "name": "AntiSpam", "value": "Strict",
"reason": "Strict protection on request of the customer." },
{ "area": "MdeScope", "name": "MacOS", "value": "Off",
"reason": "The Macs are managed with another tool." }
]
While this customer is chosen, the Apply Blueprints page compares and applies these values instead of the blueprint’s, and the reason starts with the customer’s name. An override can also add a setting the blueprint doesn’t set, for example an advanced feature such as Restrict correlation to within scoped device groups. When you later change a blueprint, every customer without an override for that setting gets the new value.
Device groups, tags and tag rules
Device groups are written in the portal’s own format, with number codes for the automation level and the rules:
"deviceGroups": [
{
"Name": "Servers",
"Description": "Servers whose name starts with SRV-",
"AutoRemediationLevel": 7,
"IsUnassignedMachineGroup": false,
"MachineGroupAssignments": [],
"GroupRules": [
{ "OperatorType": 1, "Property": 0, "PropertyValue": "SRV-" },
{ "OperatorType": 0, "Property": 1, "PropertyValue": "" },
{ "OperatorType": 0, "Property": 2, "PropertyValue": "" },
{ "OperatorType": 4, "Property": 3, "PropertyValue": "[]" }
]
}
]
| Code | Automation level (AutoRemediationLevel) |
|---|---|
3 | Full: remediate threats automatically |
7 | Semi: require approval for non-temp folders remediation |
6 | Semi: require approval for core folders remediation |
2 | Semi: require approval for any remediation |
1 | No automated response |
Property | Rule on | OperatorType | PropertyValue |
|---|---|---|---|
0 | Device name | 0 contains, 1 starts with, 2 ends with | text |
1 | Domain | 0 contains, 1 starts with, 2 ends with | text |
2 | Tag | 0 contains, 1 starts with, 2 ends with | text |
3 | OS | 4 is one of | a list as text, for example "[\"Windows11\"]" |
A group always has all four rules, and a device joins when all filled-in rules match. You don’t have to write this by hand: create the group with New Group… on the Device Groups page of a reference tenant, export it and paste it into the customer file. The tool removes the identifiers of the other tenant.
Device tags are manual tags on devices that exist now. Each device name must match exactly one device:
"deviceTags": [
{ "tag": "Server", "devices": ["SRV-DC01", "SRV-FILE01"] },
{ "tag": "MDE-Management", "devices": ["SRV-FILE01", "PC-PILOT01", "PC-PILOT02"] }
]
Tagging a few pilot devices with MDE-Management is how you start security settings management safely: with the enforcement scope on tagged devices, only those devices get the Intune endpoint security policies.
Device tag rules tag devices automatically, including devices onboarded later:
"deviceTagRules": [
{
"name": "Servers",
"tag": "Server",
"match": "AND",
"conditions": [
{ "property": "DeviceName", "operator": "StartsWith", "value": "SRV-" },
{ "property": "OnboardingStatus", "operator": "In", "value": ["Onboarded"] }
]
}
]
property | operator | value |
|---|---|---|
DeviceName | Equals or StartsWith | text |
Domain | StartsWith or Equals | text |
OSPlatform | In | a list such as ["WindowsServer2025"] |
InternetFacing | Equals | true or false |
OnboardingStatus | In | Onboarded, NotOnboarded, Unsupported, InsufficientInfo |
Tags | In | a list of device tags |
Before it creates a rule, the tool asks the portal how many devices match, just as the portal itself does.
Identities, roles and Cloud Apps
"identities": {
"directoryServicesAccounts": [
{ "accountName": "gmsa_MDI", "domain": "contoso.local" }
]
},
"rbac": {
"roles": [
{
"name": "SOC analyst",
"description": "Investigates and handles alerts and incidents.",
"permissions": [
"microsoft.xdr/secops/securitydata/alerts/manage",
"microsoft.xdr/secops/securitydata/response/manage"
],
"groups": ["SG-SOC-Analysts"],
"scopes": ["/"]
}
]
},
"cloudApps": {
"managedDomains": ["contoso.com", "contoso.be"],
"ipRanges": [
{ "name": "Head office", "category": "Corporate", "subnets": ["203.0.113.0/24"], "tags": [] },
{ "name": "VPN", "category": "VPN", "subnets": ["198.51.100.10", "198.51.100.11"], "tags": [] }
]
}
- gMSA: the account name without the domain and without the
$, and the DNS name of the domain (contoso.local, notCONTOSO). - Roles: permission names start with
microsoft.xdr/. The easiest way to get them right is to export a role from a configured tenant on the RBAC page. A group is an object ID or a display name that matches exactly one group. The scope is/for all workloads, or one or more ofMde,Mdo,Mdi,MdaandMdc. - IP ranges: the category is one of Corporate, Administrative, Risky, VPN, Cloud provider or Other. Defender for Cloud Apps only sees public addresses, so the tool warns about private ones.
Email values
"email": {
"reportedMessages": { "destination": "Both", "mailbox": "reportedmessages@contoso.com" },
"priorityAccounts": ["ceo@contoso.com", "cfo@contoso.com"],
"impersonationProtection": {
"users": ["Jane Doe;jane.doe@contoso.com"],
"domains": ["fabrikam.com"]
},
"safeLinksDoNotRewrite": ["https://intranet.contoso.com/*"],
"malwareAdminNotification": "secops@contoso.com"
}
These values go into the policies the Email and Collaboration blueprint creates. When a policy doesn’t exist yet and the customer is chosen, Apply Blueprints creates it with these values already in it. When the policy exists, Customer Settings adds the missing entries and keeps what is already there. reportedMessages is the one setting that is replaced instead of added to: Microsoft, Both (Microsoft and a mailbox) or Mailbox.
Applying a customer file
After Read Tenant and Compare on the Customer Settings page, every item gets a status:
| Status | Meaning |
|---|---|
| In place | Nothing to do |
| Missing | The tool can add it |
| Exists with other values | For example an IP range with other subnets, or a role without a permission. Change it on its own page or in the portal; the tool doesn’t replace it |
| Cannot be compared or added | The reason is shown: a device that isn’t found, a group name that matches two groups, a missing sign-in |
| In the tenant, not in the customer file | Shown for information, for domains, IP ranges, device groups, tag rules and priority accounts. Never removed |
You tick the items, or use Select All Missing, and click Apply Selected Items. As everywhere, the tool reads the tenant again just before it writes, checks the tenant in the same call and reads everything back. The report lists the items added, the full comparison and the overrides.
Putting it together
A typical onboarding of a new customer then looks like this:
- Create the customer file from the template, fill in the tenant ID and what this customer needs, and click Reload. The tool lists any mistakes with the name of the field.
- Sign in to the customer tenant and choose the customer on the Customer Settings page. From then on, Apply Blueprints uses the customer’s overrides and refuses any other tenant.
- On Apply Blueprints, choose All menus, compare, apply what you agree with, and save the report.
- On Customer Settings, compare, apply the missing items, and save that report too.
- Six months later, run the same comparison again. Anything someone changed in the meantime shows up as Differs or Missing.
Customer files contain customer data such as tenant IDs, users, domains and IP ranges, so the repository’s .gitignore keeps them out of git. The template and its complete example of every section are on GitHub.
What it covers
| Area | What you can do |
|---|---|
| Defender portal | Preview features and unified RBAC: roles from templates or your own selection of permissions, assigned to Entra ID groups |
| Endpoints | Advanced features (EDR in block mode, tamper protection, and so on), device groups, manual device tags, rule-based tag rules and the enforcement scope of security settings management |
| Intune | Defender Antivirus, forgotten Defender settings, ASR rules, Exploit Protection, App and Browser Isolation, Application control and AI agent runtime protection policies, a comparison of existing antivirus policies with the baseline, and an HTML document of your endpoint security policies |
| Identities | Sensor health and coverage, automatic Windows auditing and sensor activation, gMSA directory accounts and the action account |
| Cloud Apps | A check of what new tenants often miss, app connectors and Microsoft 365 components, file monitoring, user enrichment, Enforce app access, managed domains and IP ranges |
| Email and Collaboration | Microsoft’s Standard or Strict anti-phishing, anti-spam, anti-malware, Safe Attachments and Safe Links policies, your own policies from a JSON file, user reported settings, Teams protection, priority accounts, user tags and MDO automation |
Intune policies are created without an assignment, and existing Intune and email policies are never changed.

Safe by design
The tool is built for tenants that are not yours, so every change follows the same pattern:
- Confirm: nothing changes until you confirm, and the confirmation names the tenant.
- Read again: just before writing, the tool reads the tenant again and only writes what still differs.
- Check the tenant: the tenant is checked in the same call as the change. If the Defender and Exchange sessions belong to different tenants, it refuses to apply.
- Read back: afterwards every setting is read again and verified. A setting the portal refuses is reported as Not applied.
Requirements
- Windows with PowerShell 7.
- For the Defender portal pages: the community module XDRInternals (the tool offers to install it) and an account such as Security Administrator.
- For the Intune pages: Microsoft Graph with
DeviceManagementConfiguration.ReadWrite.All, through your own sign-in or a service principal. - For the email pages: the ExchangeOnlineManagement module, version 3.0 or later. Safe Attachments, Safe Links and impersonation protection need Defender for Office 365.
Start it with:
pwsh -File .\DefenderConfigurator.ps1
The README on GitHub has the full list of permissions, and APIs.md lists every service and endpoint the tool contacts.
A word about unofficial APIs
Many Defender portal settings have no public API. For those, the tool builds on XDRInternals and on requests recorded from the Defender portal itself, sent exactly the way the portal sends them. Microsoft does not document or support these APIs, so a portal update can break a setting without warning. Always check the result in the portal.
Feedback
Found a bug or have an idea? Open an issue on GitHub or contact me. Defender Configurator is released under the MIT License and provided as is, without warranty.