防止在使用計量付費連線時進行 OneDrive 檔案同步 的登錄值 DisableMeteredNetworkFileSync電腦HKLM\Software\Policies\Microsoft\Windows\OneDrive

原則 ID
PreventOneDriveFileSyncOnMeteredNetwork
適用範圍
電腦設定
支援的作業系統
僅 Windows Server 2012 R2、Windows 8.1 或 Windows RT 8.1
來源
Administrative Templates (.admx) for Windows 11 2026 Update (26H2) (版本 1.0)
類別
Windows 元件 › OneDrive

登錄

DisableMeteredNetworkFileSync

REG_DWORD電腦
啟用時的值
取決於選項值
元素
計量付費網路設定
選項
項目儲存的值
在所有計量付費連線上封鎖同步0
漫遊時在計量付費連線上封鎖同步1
以 .reg · CMD · PowerShell 套用
.reg
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\OneDrive]

; 選項 (只使用其中一個)
; 在所有計量付費連線上封鎖同步
"DisableMeteredNetworkFileSync"=dword:00000000
; 漫遊時在計量付費連線上封鎖同步
"DisableMeteredNetworkFileSync"=dword:00000001
CMD
:: 選項 (只使用其中一個)

:: 在所有計量付費連線上封鎖同步
reg add "HKLM\Software\Policies\Microsoft\Windows\OneDrive" /v "DisableMeteredNetworkFileSync" /t REG_DWORD /d 0 /f
:: 漫遊時在計量付費連線上封鎖同步
reg add "HKLM\Software\Policies\Microsoft\Windows\OneDrive" /v "DisableMeteredNetworkFileSync" /t REG_DWORD /d 1 /f
PowerShell
# 共通: 建立機碼
New-Item -Path 'HKLM:\Software\Policies\Microsoft\Windows\OneDrive' -Force | Out-Null

# 選項 (只使用其中一個)
# 在所有計量付費連線上封鎖同步
New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\OneDrive' -Name 'DisableMeteredNetworkFileSync' -PropertyType DWord -Value 0 -Force | Out-Null
# 漫遊時在計量付費連線上封鎖同步
New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\OneDrive' -Name 'DisableMeteredNetworkFileSync' -PropertyType DWord -Value 1 -Force | Out-Null