設定遠端桌面授權模式 的登錄值 LicensingMode電腦HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services

原則 ID
TS_LICENSING_MODE
適用範圍
電腦設定
支援的作業系統
至少需要 Windows Server 2003 含 Service Pack 1
來源
Administrative Templates (.admx) for Windows 11 2026 Update (26H2) (版本 1.0)
類別
Windows 元件 › 遠端桌面服務 › 遠端桌面工作階段主機 › 授權

登錄

LicensingMode

REG_DWORD電腦
啟用時的值
取決於選項值
元素
指定 RD 工作階段主機伺服器的授權模式。
選項
項目儲存的值
每個裝置2
每位使用者4
每個使用者的 AAD6
以 .reg · CMD · PowerShell 套用
.reg
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services]

; 選項 (只使用其中一個)
; 每個裝置
"LicensingMode"=dword:00000002
; 每位使用者
"LicensingMode"=dword:00000004
; 每個使用者的 AAD
"LicensingMode"=dword:00000006
CMD
:: 選項 (只使用其中一個)

:: 每個裝置
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v "LicensingMode" /t REG_DWORD /d 2 /f
:: 每位使用者
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v "LicensingMode" /t REG_DWORD /d 4 /f
:: 每個使用者的 AAD
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v "LicensingMode" /t REG_DWORD /d 6 /f
PowerShell
# 共通: 建立機碼
New-Item -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services' -Force | Out-Null

# 選項 (只使用其中一個)
# 每個裝置
New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services' -Name 'LicensingMode' -PropertyType DWord -Value 2 -Force | Out-Null
# 每位使用者
New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services' -Name 'LicensingMode' -PropertyType DWord -Value 4 -Force | Out-Null
# 每個使用者的 AAD
New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services' -Name 'LicensingMode' -PropertyType DWord -Value 6 -Force | Out-Null