Configure cookies
Explanation
Control whether websites can create cookies on the user's device. This policy is all or nothing - you can let all websites create cookies, or no websites create cookies. You can't use this policy to enable cookies from specific websites.
Set the policy to 'SessionOnly' to clear cookies when the session closes.
If you don't configure this policy, the default 'AllowCookies' is used, and users can change this setting in Microsoft Edge Settings. (If you don't want users to be able to change this setting, set the policy.)
Policy options mapping:
* AllowCookies (1) = Let all sites create cookies
* BlockCookies (2) = Don't let any site create cookies
* SessionOnly (4) = Keep cookies for the duration of the session, except ones listed in 'SaveCookiesOnExit' (Save cookies when Microsoft Edge closes)
Use the preceding information when configuring this policy.
Registry
HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\EdgeHKEY_CURRENT_USER\Software\Policies\Microsoft\Edge- Value name
- not defined in the ADMX
Enable / disable values: not defined in the ADMX (see the options below).
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.
Computer (HKLM)
Enable
# Enable: msedge/DefaultCookiesSetting
$k = 'HKLM:\Software\Policies\Microsoft\Edge'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# Configure cookies
# Possible options:
# Let all sites create cookies = 1
# Don't let any site create cookies = 2
# Keep cookies for the duration of the session, except ones listed in "SaveCookiesOnExit" = 4
Set-ItemProperty -Path $k -Name 'DefaultCookiesSetting' -Value 1 -Type DWordDisable
# Disable: msedge/DefaultCookiesSetting
# No value is written in the "Disabled" state (nothing defined in the ADMX)Revert to "Not configured"
# Revert to "Not configured": msedge/DefaultCookiesSetting
$k = 'HKLM:\Software\Policies\Microsoft\Edge'
Remove-ItemProperty -Path $k -Name 'DefaultCookiesSetting' -ErrorAction SilentlyContinueUser (HKCU)
Enable
Disable
Revert to "Not configured"
Options (1)
| Label | Control | Registry value | REG type | Constraints / details | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Configure cookiesDefaultCookiesSetting | Drop-down listenum | DefaultCookiesSetting | REG_DWORD |
|
Application
Microsoft Edge (+ Edge Update, WebView2) (Microsoft) — November 2026 templates
Official templates downloaded on November 12, 2026.