Turn on Windows Defender protection against Potentially Unwanted Applications (DEPRECATED)
Explanation
Beginning with Windows 10 v1809 and Windows Server v1809, this functionality should instead be configured through the following Group Policy setting:
Computer Configuration\Administrative Templates\Windows Components\Windows Defender Antivirus\Configure detection for potentially unwanted applications.
Registry
HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows Defender\MpEngine- Value name
MpEnablePus
| State | Value written |
|---|---|
| Enabled | REG_DWORD = 1 |
| Disabled | REG_DWORD = 0 |
PowerShell
PowerShell commands that write to the registry what the policy would write. Values in angle brackets (<…>) must be replaced.
Writing directly to the registry bypasses Group Policy: if a GPO manages this value, it will be rewritten at the next gpupdate; otherwise the value stays in place (the "tattooing" effect). Prefer a GPO or, locally, LGPO.exe. Run PowerShell as administrator for HKLM. Some policies need a restart or gpupdate /force.
Enable
# Enable: SecGuide/Pol_SecGuide_0101_WDPUA
$k = 'HKLM:\Software\Policies\Microsoft\Windows Defender\MpEngine'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'MpEnablePus' -Value 1 -Type DWordDisable
# Disable: SecGuide/Pol_SecGuide_0101_WDPUA
$k = 'HKLM:\Software\Policies\Microsoft\Windows Defender\MpEngine'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'MpEnablePus' -Value 0 -Type DWordRevert to "Not configured"
# Revert to "Not configured": SecGuide/Pol_SecGuide_0101_WDPUA
$k = 'HKLM:\Software\Policies\Microsoft\Windows Defender\MpEngine'
Remove-ItemProperty -Path $k -Name 'MpEnablePus' -ErrorAction SilentlyContinueApplication
Microsoft Security Baseline (MSS, SecGuide) (Microsoft) — November 2026 templates
Official templates downloaded on November 12, 2026.