設定 Cookie 的登錄值 Cookies (Main)電腦HKLM\Software\Policies\Microsoft\MicrosoftEdge\Main
- 原則 ID
- Cookies
- 適用範圍
- 電腦設定、使用者設定
- 支援的作業系統
- Windows 10 或更新版本上的 Microsoft Edge
- 來源
- Administrative Templates (.admx) for Windows 11 2026 Update (26H2) (版本 1.0)
- 類別
- Windows 元件 › Microsoft Edge
登錄
Cookies
REG_DWORD電腦使用者…\Software\Policies\Microsoft\MicrosoftEdge\MainHKLM\Software\Policies\Microsoft\MicrosoftEdge\Main 目前的機碼
HKCU\Software\Policies\Microsoft\MicrosoftEdge\Main
HKCU\Software\Policies\Microsoft\MicrosoftEdge\Main
- 啟用時的值
- 取決於選項值
- 元素
- 設定 Cookie
| 項目 | 儲存的值 |
|---|---|
| 封鎖所有 Cookie | 0 |
| 只封鎖第三方 Cookie | 1 |
| 允許所有 Cookie (預設值) | 2 |
以 .reg · CMD · PowerShell 套用
電腦整部電腦的設定
.reg
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\MicrosoftEdge\Main] ; 選項 (只使用其中一個) ; 封鎖所有 Cookie "Cookies"=dword:00000000 ; 只封鎖第三方 Cookie "Cookies"=dword:00000001 ; 允許所有 Cookie (預設值) "Cookies"=dword:00000002
CMD
:: 選項 (只使用其中一個) :: 封鎖所有 Cookie reg add "HKLM\Software\Policies\Microsoft\MicrosoftEdge\Main" /v "Cookies" /t REG_DWORD /d 0 /f :: 只封鎖第三方 Cookie reg add "HKLM\Software\Policies\Microsoft\MicrosoftEdge\Main" /v "Cookies" /t REG_DWORD /d 1 /f :: 允許所有 Cookie (預設值) reg add "HKLM\Software\Policies\Microsoft\MicrosoftEdge\Main" /v "Cookies" /t REG_DWORD /d 2 /f
PowerShell
# 共通: 建立機碼 New-Item -Path 'HKLM:\Software\Policies\Microsoft\MicrosoftEdge\Main' -Force | Out-Null # 選項 (只使用其中一個) # 封鎖所有 Cookie New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\MicrosoftEdge\Main' -Name 'Cookies' -PropertyType DWord -Value 0 -Force | Out-Null # 只封鎖第三方 Cookie New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\MicrosoftEdge\Main' -Name 'Cookies' -PropertyType DWord -Value 1 -Force | Out-Null # 允許所有 Cookie (預設值) New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\MicrosoftEdge\Main' -Name 'Cookies' -PropertyType DWord -Value 2 -Force | Out-Null
使用者各帳戶的設定
.reg
Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Policies\Microsoft\MicrosoftEdge\Main] ; 選項 (只使用其中一個) ; 封鎖所有 Cookie "Cookies"=dword:00000000 ; 只封鎖第三方 Cookie "Cookies"=dword:00000001 ; 允許所有 Cookie (預設值) "Cookies"=dword:00000002
CMD
:: 選項 (只使用其中一個) :: 封鎖所有 Cookie reg add "HKCU\Software\Policies\Microsoft\MicrosoftEdge\Main" /v "Cookies" /t REG_DWORD /d 0 /f :: 只封鎖第三方 Cookie reg add "HKCU\Software\Policies\Microsoft\MicrosoftEdge\Main" /v "Cookies" /t REG_DWORD /d 1 /f :: 允許所有 Cookie (預設值) reg add "HKCU\Software\Policies\Microsoft\MicrosoftEdge\Main" /v "Cookies" /t REG_DWORD /d 2 /f
PowerShell
# 共通: 建立機碼 New-Item -Path 'HKCU:\Software\Policies\Microsoft\MicrosoftEdge\Main' -Force | Out-Null # 選項 (只使用其中一個) # 封鎖所有 Cookie New-ItemProperty -Path 'HKCU:\Software\Policies\Microsoft\MicrosoftEdge\Main' -Name 'Cookies' -PropertyType DWord -Value 0 -Force | Out-Null # 只封鎖第三方 Cookie New-ItemProperty -Path 'HKCU:\Software\Policies\Microsoft\MicrosoftEdge\Main' -Name 'Cookies' -PropertyType DWord -Value 1 -Force | Out-Null # 允許所有 Cookie (預設值) New-ItemProperty -Path 'HKCU:\Software\Policies\Microsoft\MicrosoftEdge\Main' -Name 'Cookies' -PropertyType DWord -Value 2 -Force | Out-Null