Configure cookies: registry value Cookies (Main)UserHKCU\Software\Policies\Microsoft\MicrosoftEdge\Main

Policy ID
Cookies
Scope
Computer Configuration, User Configuration
Supported on
Microsoft Edge on Windows 10 or later
Source
Administrative Templates (.admx) for Windows 11 2026 Update (26H2) (version 1.0)
Category
Windows Components › Microsoft Edge

Registry

Cookies

REG_DWORDUserComputer
Enabled value
Depends on the option value
Element
Configure Cookies
Options
ItemStored value
Block all cookies0
Block only 3rd-party cookies1
Allow all cookies (default)2
Apply with .reg · CMD · PowerShell
UserPer-account setting
.reg
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Policies\Microsoft\MicrosoftEdge\Main]

; Options (use only one)
; Block all cookies
"Cookies"=dword:00000000
; Block only 3rd-party cookies
"Cookies"=dword:00000001
; Allow all cookies (default)
"Cookies"=dword:00000002
CMD
:: Options (use only one)

:: Block all cookies
reg add "HKCU\Software\Policies\Microsoft\MicrosoftEdge\Main" /v "Cookies" /t REG_DWORD /d 0 /f
:: Block only 3rd-party cookies
reg add "HKCU\Software\Policies\Microsoft\MicrosoftEdge\Main" /v "Cookies" /t REG_DWORD /d 1 /f
:: Allow all cookies (default)
reg add "HKCU\Software\Policies\Microsoft\MicrosoftEdge\Main" /v "Cookies" /t REG_DWORD /d 2 /f
PowerShell
# Common: create the key
New-Item -Path 'HKCU:\Software\Policies\Microsoft\MicrosoftEdge\Main' -Force | Out-Null

# Options (use only one)
# Block all cookies
New-ItemProperty -Path 'HKCU:\Software\Policies\Microsoft\MicrosoftEdge\Main' -Name 'Cookies' -PropertyType DWord -Value 0 -Force | Out-Null
# Block only 3rd-party cookies
New-ItemProperty -Path 'HKCU:\Software\Policies\Microsoft\MicrosoftEdge\Main' -Name 'Cookies' -PropertyType DWord -Value 1 -Force | Out-Null
# Allow all cookies (default)
New-ItemProperty -Path 'HKCU:\Software\Policies\Microsoft\MicrosoftEdge\Main' -Name 'Cookies' -PropertyType DWord -Value 2 -Force | Out-Null
ComputerMachine-wide setting
.reg
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\MicrosoftEdge\Main]

; Options (use only one)
; Block all cookies
"Cookies"=dword:00000000
; Block only 3rd-party cookies
"Cookies"=dword:00000001
; Allow all cookies (default)
"Cookies"=dword:00000002
CMD
:: Options (use only one)

:: Block all cookies
reg add "HKLM\Software\Policies\Microsoft\MicrosoftEdge\Main" /v "Cookies" /t REG_DWORD /d 0 /f
:: Block only 3rd-party cookies
reg add "HKLM\Software\Policies\Microsoft\MicrosoftEdge\Main" /v "Cookies" /t REG_DWORD /d 1 /f
:: Allow all cookies (default)
reg add "HKLM\Software\Policies\Microsoft\MicrosoftEdge\Main" /v "Cookies" /t REG_DWORD /d 2 /f
PowerShell
# Common: create the key
New-Item -Path 'HKLM:\Software\Policies\Microsoft\MicrosoftEdge\Main' -Force | Out-Null

# Options (use only one)
# Block all cookies
New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\MicrosoftEdge\Main' -Name 'Cookies' -PropertyType DWord -Value 0 -Force | Out-Null
# Block only 3rd-party cookies
New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\MicrosoftEdge\Main' -Name 'Cookies' -PropertyType DWord -Value 1 -Force | Out-Null
# Allow all cookies (default)
New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\MicrosoftEdge\Main' -Name 'Cookies' -PropertyType DWord -Value 2 -Force | Out-Null