指定預設配額限制和警告等級 的登錄值 Limit 等 3 個電腦HKLM\Software\Policies\Microsoft\Windows NT\DiskQuota

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

登錄

Limit

REG_DWORD電腦
啟用時的值
取決於選項值
元素
值
值類型
REG_DWORD
用戶端擴充功能
{3610eda5-77ef-11d2-8dc5-00c04fa31a66}
必要
true
最大值
1000
以 .reg · CMD · PowerShell 套用
.reg
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows NT\DiskQuota]

; 值名稱與類型依照 ADMX。請自行填入下方的 <輸入值>
"Limit"=dword:<輸入值>
CMD
:: 值名稱與類型依照 ADMX。請自行填入下方的 <輸入值>

reg add "HKLM\Software\Policies\Microsoft\Windows NT\DiskQuota" /v "Limit" /t REG_DWORD /d "<輸入值>" /f
PowerShell
# 值名稱與類型依照 ADMX。請自行填入下方的 <輸入值>

New-Item -Path 'HKLM:\Software\Policies\Microsoft\Windows NT\DiskQuota' -Force | Out-Null
New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows NT\DiskQuota' -Name 'Limit' -PropertyType DWord -Value '<輸入值>' -Force | Out-Null

LimitUnits

REG_DWORD電腦
啟用時的值
取決於選項值
元素
單位
選項
項目儲存的值
KB1
MB2
GB3
TB4
PB5
EB6
以 .reg · CMD · PowerShell 套用
.reg
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows NT\DiskQuota]

; 選項 (只使用其中一個)
; KB
"LimitUnits"=dword:00000001
; MB
"LimitUnits"=dword:00000002
; GB
"LimitUnits"=dword:00000003
; TB
"LimitUnits"=dword:00000004
; PB
"LimitUnits"=dword:00000005
; EB
"LimitUnits"=dword:00000006
CMD
:: 選項 (只使用其中一個)

:: KB
reg add "HKLM\Software\Policies\Microsoft\Windows NT\DiskQuota" /v "LimitUnits" /t REG_DWORD /d 1 /f
:: MB
reg add "HKLM\Software\Policies\Microsoft\Windows NT\DiskQuota" /v "LimitUnits" /t REG_DWORD /d 2 /f
:: GB
reg add "HKLM\Software\Policies\Microsoft\Windows NT\DiskQuota" /v "LimitUnits" /t REG_DWORD /d 3 /f
:: TB
reg add "HKLM\Software\Policies\Microsoft\Windows NT\DiskQuota" /v "LimitUnits" /t REG_DWORD /d 4 /f
:: PB
reg add "HKLM\Software\Policies\Microsoft\Windows NT\DiskQuota" /v "LimitUnits" /t REG_DWORD /d 5 /f
:: EB
reg add "HKLM\Software\Policies\Microsoft\Windows NT\DiskQuota" /v "LimitUnits" /t REG_DWORD /d 6 /f
PowerShell
# 共通: 建立機碼
New-Item -Path 'HKLM:\Software\Policies\Microsoft\Windows NT\DiskQuota' -Force | Out-Null

# 選項 (只使用其中一個)
# KB
New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows NT\DiskQuota' -Name 'LimitUnits' -PropertyType DWord -Value 1 -Force | Out-Null
# MB
New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows NT\DiskQuota' -Name 'LimitUnits' -PropertyType DWord -Value 2 -Force | Out-Null
# GB
New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows NT\DiskQuota' -Name 'LimitUnits' -PropertyType DWord -Value 3 -Force | Out-Null
# TB
New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows NT\DiskQuota' -Name 'LimitUnits' -PropertyType DWord -Value 4 -Force | Out-Null
# PB
New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows NT\DiskQuota' -Name 'LimitUnits' -PropertyType DWord -Value 5 -Force | Out-Null
# EB
New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows NT\DiskQuota' -Name 'LimitUnits' -PropertyType DWord -Value 6 -Force | Out-Null

Threshold

REG_DWORD電腦
啟用時的值
取決於選項值
元素
值
值類型
REG_DWORD
用戶端擴充功能
{3610eda5-77ef-11d2-8dc5-00c04fa31a66}
必要
true
最大值
1000
以 .reg · CMD · PowerShell 套用
.reg
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows NT\DiskQuota]

; 值名稱與類型依照 ADMX。請自行填入下方的 <輸入值>
"Threshold"=dword:<輸入值>
CMD
:: 值名稱與類型依照 ADMX。請自行填入下方的 <輸入值>

reg add "HKLM\Software\Policies\Microsoft\Windows NT\DiskQuota" /v "Threshold" /t REG_DWORD /d "<輸入值>" /f
PowerShell
# 值名稱與類型依照 ADMX。請自行填入下方的 <輸入值>

New-Item -Path 'HKLM:\Software\Policies\Microsoft\Windows NT\DiskQuota' -Force | Out-Null
New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows NT\DiskQuota' -Name 'Threshold' -PropertyType DWord -Value '<輸入值>' -Force | Out-Null

ThresholdUnits

REG_DWORD電腦
啟用時的值
取決於選項值
元素
單位
選項
項目儲存的值
KB1
MB2
GB3
TB4
PB5
EB6
以 .reg · CMD · PowerShell 套用
.reg
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows NT\DiskQuota]

; 選項 (只使用其中一個)
; KB
"ThresholdUnits"=dword:00000001
; MB
"ThresholdUnits"=dword:00000002
; GB
"ThresholdUnits"=dword:00000003
; TB
"ThresholdUnits"=dword:00000004
; PB
"ThresholdUnits"=dword:00000005
; EB
"ThresholdUnits"=dword:00000006
CMD
:: 選項 (只使用其中一個)

:: KB
reg add "HKLM\Software\Policies\Microsoft\Windows NT\DiskQuota" /v "ThresholdUnits" /t REG_DWORD /d 1 /f
:: MB
reg add "HKLM\Software\Policies\Microsoft\Windows NT\DiskQuota" /v "ThresholdUnits" /t REG_DWORD /d 2 /f
:: GB
reg add "HKLM\Software\Policies\Microsoft\Windows NT\DiskQuota" /v "ThresholdUnits" /t REG_DWORD /d 3 /f
:: TB
reg add "HKLM\Software\Policies\Microsoft\Windows NT\DiskQuota" /v "ThresholdUnits" /t REG_DWORD /d 4 /f
:: PB
reg add "HKLM\Software\Policies\Microsoft\Windows NT\DiskQuota" /v "ThresholdUnits" /t REG_DWORD /d 5 /f
:: EB
reg add "HKLM\Software\Policies\Microsoft\Windows NT\DiskQuota" /v "ThresholdUnits" /t REG_DWORD /d 6 /f
PowerShell
# 共通: 建立機碼
New-Item -Path 'HKLM:\Software\Policies\Microsoft\Windows NT\DiskQuota' -Force | Out-Null

# 選項 (只使用其中一個)
# KB
New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows NT\DiskQuota' -Name 'ThresholdUnits' -PropertyType DWord -Value 1 -Force | Out-Null
# MB
New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows NT\DiskQuota' -Name 'ThresholdUnits' -PropertyType DWord -Value 2 -Force | Out-Null
# GB
New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows NT\DiskQuota' -Name 'ThresholdUnits' -PropertyType DWord -Value 3 -Force | Out-Null
# TB
New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows NT\DiskQuota' -Name 'ThresholdUnits' -PropertyType DWord -Value 4 -Force | Out-Null
# PB
New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows NT\DiskQuota' -Name 'ThresholdUnits' -PropertyType DWord -Value 5 -Force | Out-Null
# EB
New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows NT\DiskQuota' -Name 'ThresholdUnits' -PropertyType DWord -Value 6 -Force | Out-Null