控制在可熱插拔磁碟上掛接 ReFS 磁碟區 的登錄值 RefsHotplugMountPolicy電腦HKLM\System\CurrentControlSet\Policies

原則 ID
BlockHotplugMount
適用範圍
電腦設定
支援的作業系統
至少需要 Windows 11 版本 22H2
來源
Administrative Templates (.admx) for Windows 11 2026 Update (26H2) (版本 1.0)
類別
系統 › 檔案系統

登錄

RefsHotplugMountPolicy

REG_DWORD電腦
啟用時的值
取決於選項值
元素
熱插拔式磁碟上 ReFS 磁碟區的動作
選項
項目儲存的值
關閉0
僅稽核1
封鎖2
以 .reg · CMD · PowerShell 套用
.reg
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Policies]

; 選項 (只使用其中一個)
; 關閉
"RefsHotplugMountPolicy"=dword:00000000
; 僅稽核
"RefsHotplugMountPolicy"=dword:00000001
; 封鎖
"RefsHotplugMountPolicy"=dword:00000002
CMD
:: 選項 (只使用其中一個)

:: 關閉
reg add "HKLM\System\CurrentControlSet\Policies" /v "RefsHotplugMountPolicy" /t REG_DWORD /d 0 /f
:: 僅稽核
reg add "HKLM\System\CurrentControlSet\Policies" /v "RefsHotplugMountPolicy" /t REG_DWORD /d 1 /f
:: 封鎖
reg add "HKLM\System\CurrentControlSet\Policies" /v "RefsHotplugMountPolicy" /t REG_DWORD /d 2 /f
PowerShell
# 共通: 建立機碼
New-Item -Path 'HKLM:\System\CurrentControlSet\Policies' -Force | Out-Null

# 選項 (只使用其中一個)
# 關閉
New-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Policies' -Name 'RefsHotplugMountPolicy' -PropertyType DWord -Value 0 -Force | Out-Null
# 僅稽核
New-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Policies' -Name 'RefsHotplugMountPolicy' -PropertyType DWord -Value 1 -Force | Out-Null
# 封鎖
New-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Policies' -Name 'RefsHotplugMountPolicy' -PropertyType DWord -Value 2 -Force | Out-Null