透過內部網路路由傳送所有流量 的登錄值 Force_Tunneling電腦HKLM\Software\Policies\Microsoft\Windows\TCPIP\v6Transition

原則 ID
NC_ForceTunneling
適用範圍
電腦設定
支援的作業系統
至少需要 Windows Server 2008 R2 或 Windows 7
來源
Administrative Templates (.admx) for Windows 11 2026 Update (26H2) (版本 1.0)
類別
網路 › 網路連線

登錄

Force_Tunneling

REG_SZ電腦
啟用時的值
取決於選項值
元素
從下列狀態中選取:
選項
項目儲存的值
啟用狀態Enabled
停用狀態Disabled
以 .reg · CMD · PowerShell 套用
.reg
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\TCPIP\v6Transition]

; 選項 (只使用其中一個)
; 啟用狀態
"Force_Tunneling"="Enabled"
; 停用狀態
"Force_Tunneling"="Disabled"
CMD
:: 選項 (只使用其中一個)

:: 啟用狀態
reg add "HKLM\Software\Policies\Microsoft\Windows\TCPIP\v6Transition" /v "Force_Tunneling" /t REG_SZ /d "Enabled" /f
:: 停用狀態
reg add "HKLM\Software\Policies\Microsoft\Windows\TCPIP\v6Transition" /v "Force_Tunneling" /t REG_SZ /d "Disabled" /f
PowerShell
# 共通: 建立機碼
New-Item -Path 'HKLM:\Software\Policies\Microsoft\Windows\TCPIP\v6Transition' -Force | Out-Null

# 選項 (只使用其中一個)
# 啟用狀態
New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\TCPIP\v6Transition' -Name 'Force_Tunneling' -PropertyType String -Value 'Enabled' -Force | Out-Null
# 停用狀態
New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\TCPIP\v6Transition' -Name 'Force_Tunneling' -PropertyType String -Value 'Disabled' -Force | Out-Null