Security & Defender

Controlled Configuration for Defender: deciding which channel actually owns your antivirus settings

New in preview: Intune-delivered Defender settings can now override Group Policy, Configuration Manager and local scripts. Useful, and not something to switch on tenant-wide.

Controlled Configuration for Defender: deciding which channel actually owns your antivirus settings. Security article banner on grbadhon.com

Every co-managed estate has the same argument running quietly in the background: Intune says one thing, Group Policy says another, and a script somebody wrote in 2019 says a third. Controlled Configuration, in preview since service release 2607, finally lets you declare a winner.

What it does

When Controlled Configuration is enabled, the Microsoft Defender antivirus settings delivered by Intune, or by Defender for Endpoint security settings management, become authoritative. They override configuration arriving from other channels: Group Policy, Configuration Manager, and local scripts. Microsoft describes it as an extension of Tamper Protection, which is the right way to think about it. Tamper Protection stops the endpoint changing your settings. Controlled Configuration stops your own other management channels changing them.

Caution

This is in preview. It is also, by design, the setting that makes other management channels stop working. Those two facts together mean a pilot ring, not a tenant-wide enable, and a rollback plan you have actually tested.

Why this matters more in co-management than anywhere else

On a cloud-only estate, settings conflict is mostly an Intune-versus-Intune problem, and policy conflict reporting will tell you about it. In a co-managed estate the channels do not know about each other. ConfigMgr applies its baseline, Group Policy refreshes on its own schedule, Intune syncs on another, and the last writer wins until something else refreshes.

The symptom is familiar: a setting that is correct in the console, correct on the device when you check it on Tuesday, and wrong again on Thursday. Nobody changed anything. A different channel simply got there last.

Finding out which channel is winning today

Before enabling anything authoritative, establish what is actually applied and where it came from. Run this on a representative device from each ring.

Get-DefenderDrift.ps1
# Effective Defender antivirus state as the engine sees it.
$pref = Get-MpPreference
$stat = Get-MpComputerStatus

[PSCustomObject]@{
    TamperProtection   = $stat.IsTamperProtected
    RealTimeProtection = $stat.RealTimeProtectionEnabled
    CloudProtection    = $pref.MAPSReporting          # 2 = Advanced
    SampleSubmission   = $pref.SubmitSamplesConsent
    PUAProtection      = $pref.PUAProtection          # 1 = Enabled
    CloudBlockLevel    = $pref.CloudBlockLevel
    ScanScheduleDay    = $pref.ScanScheduleDay
} | Format-List

# Where the policy came from. Anything under the Policies hive arrived from
# Group Policy or ConfigMgr; the non-Policies hive is local or script set.
$paths = @(
    ‘HKLM:SOFTWAREPoliciesMicrosoftWindows Defender’
    ‘HKLM:SOFTWAREMicrosoftWindows Defender’
)
foreach ($p in $paths) {
    if (Test-Path $p) {
        Write-Host “`n== $p” -ForegroundColor Cyan
        Get-ItemProperty $p |
            Select-Object -Property * -ExcludeProperty PS* |
            Format-List
    }
}

# Intune’s own delivered policy, for comparison.
$mdm = ‘HKLM:SOFTWAREMicrosoftPolicyManagercurrentdeviceDefender’
if (Test-Path $mdm) {
    Write-Host “`n== Intune (PolicyManager)” -ForegroundColor Green
    Get-ItemProperty $mdm | Select-Object -Property * -ExcludeProperty PS* | Format-List
}

If the Policies hive and the PolicyManager hive disagree, you have found your Thursday problem. That disagreement is exactly what Controlled Configuration resolves, and knowing which values will win before you enable it is the difference between a fix and an incident.

A sane rollout

  1. Inventory first. Run the script above across a sample from every ring, including the machines nobody has touched in two years. Those are where the surprises live.
  2. Reconcile in Intune. Whatever Controlled Configuration is going to enforce needs to be correct in Intune before you enforce it, because afterwards the other channels stop compensating for gaps.
  3. Enable on a small ring. Ten to twenty devices that represent your actual estate rather than your cleanest machines.
  4. Re-run the drift script after a Group Policy refresh cycle. The point is to confirm the Policies hive no longer wins. If it still does, stop and find out why before widening.
  5. Widen by ring, not by percentage. Antivirus configuration is the wrong place to discover an edge case at scale.

Worth knowing

Also new in the same release: Intune can now collect Windows registry data through the properties catalog, including a single value, everything directly under a key, or the same value across subkeys under HKEY_LOCAL_MACHINE. That removes the custom inventory script most people wrote to answer exactly the question above.

What I would do

If you are cloud-only, this is a tidy improvement and low urgency. Policy conflict reporting already tells you most of what you need.

If you are co-managed and you have ever chased a setting that reverts on its own, this is the feature you have been waiting for and it is still worth piloting carefully. Enable it where the Defender workload has already moved to Intune, not as a way of moving it.

And if you are running Defender configuration from three channels because nobody ever decided which one owns it, Controlled Configuration will not make that decision for you. It will only enforce whichever answer you finally write down.

Common questions

A capability, in preview since Intune service release 2607, that makes Defender antivirus settings delivered by Intune or Defender for Endpoint security settings management authoritative. They override settings arriving from Group Policy, Configuration Manager and local scripts. Microsoft frames it as an extension of Tamper Protection.

Tamper Protection prevents the endpoint, or software on it, changing Defender settings. Controlled Configuration prevents your own other management channels changing them. One defends against the device, the other against your estate disagreeing with itself.

No. It is in preview and it deliberately stops other management channels taking effect. Pilot it on a small ring that represents your real estate, reconcile your Intune settings first, and re-check after a full Group Policy refresh cycle before widening.

Compare the registry hives. Values under HKLM SOFTWARE Policies Microsoft Windows Defender arrived from Group Policy or Configuration Manager. Values under HKLM SOFTWARE Microsoft PolicyManager current device Defender came from Intune. If they disagree, that is your drift.

It is most useful there. In co-management the channels do not coordinate, so the last writer wins until another refresh cycle overwrites it. That is the cause of settings that look correct in the console and revert on the device days later.