Zeitlimit für aktive Remotedesktopdienste-Sitzungen festlegen: Registrierungswert MaxConnectionTime (HKCU Terminal Services)BenutzerHKCU\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services

Richtlinien-ID
TS_SESSIONS_Limits_1
Bereich
Benutzerkonfiguration
Unterstützt unter
Mindestens Windows Server 2003-Betriebssysteme oder Windows XP Professional
Quelle
Administrative Templates (.admx) for Windows 11 2026 Update (26H2) (Version 1.0)
Kategorie
Windows-Komponenten › Remotedesktopdienste › Remotedesktopsitzungs-Host › Sitzungszeitlimits

Registrierung

MaxConnectionTime

REG_DWORDBenutzer
Wert bei Aktivierung
Hängt vom Wert der Option ab
Element
Limit für aktive Sitzungen:
Optionen
EintragGespeicherter Wert
Nie0
1 Minute60000
5 Minuten300000
10 Minuten600000
15 Minuten900000
30 Minuten1800000
1 Stunde3600000
2 Stunden7200000
3 Stunden10800000
6 Stunden21600000
8 Stunden28800000
12 Stunden43200000
16 Stunden57600000
18 Stunden64800000
1 Tag86400000
2 Tage172800000
3 Tage259200000
4 Tage345600000
5 Tage432000000
Mit .reg · CMD · PowerShell anwenden
.reg
Windows Registry Editor Version 5.00

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

; Optionen (nur eine verwenden)
; Nie
"MaxConnectionTime"=dword:00000000
; 1 Minute
"MaxConnectionTime"=dword:0000ea60
; 5 Minuten
"MaxConnectionTime"=dword:000493e0
; 10 Minuten
"MaxConnectionTime"=dword:000927c0
; 15 Minuten
"MaxConnectionTime"=dword:000dbba0
; 30 Minuten
"MaxConnectionTime"=dword:001b7740
; 1 Stunde
"MaxConnectionTime"=dword:0036ee80
; 2 Stunden
"MaxConnectionTime"=dword:006ddd00
; 3 Stunden
"MaxConnectionTime"=dword:00a4cb80
; 6 Stunden
"MaxConnectionTime"=dword:01499700
; 8 Stunden
"MaxConnectionTime"=dword:01b77400
; 12 Stunden
"MaxConnectionTime"=dword:02932e00
; 16 Stunden
"MaxConnectionTime"=dword:036ee800
; 18 Stunden
"MaxConnectionTime"=dword:03dcc500
; 1 Tag
"MaxConnectionTime"=dword:05265c00
; 2 Tage
"MaxConnectionTime"=dword:0a4cb800
; 3 Tage
"MaxConnectionTime"=dword:0f731400
; 4 Tage
"MaxConnectionTime"=dword:14997000
; 5 Tage
"MaxConnectionTime"=dword:19bfcc00
CMD
:: Optionen (nur eine verwenden)

:: Nie
reg add "HKCU\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v "MaxConnectionTime" /t REG_DWORD /d 0 /f
:: 1 Minute
reg add "HKCU\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v "MaxConnectionTime" /t REG_DWORD /d 60000 /f
:: 5 Minuten
reg add "HKCU\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v "MaxConnectionTime" /t REG_DWORD /d 300000 /f
:: 10 Minuten
reg add "HKCU\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v "MaxConnectionTime" /t REG_DWORD /d 600000 /f
:: 15 Minuten
reg add "HKCU\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v "MaxConnectionTime" /t REG_DWORD /d 900000 /f
:: 30 Minuten
reg add "HKCU\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v "MaxConnectionTime" /t REG_DWORD /d 1800000 /f
:: 1 Stunde
reg add "HKCU\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v "MaxConnectionTime" /t REG_DWORD /d 3600000 /f
:: 2 Stunden
reg add "HKCU\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v "MaxConnectionTime" /t REG_DWORD /d 7200000 /f
:: 3 Stunden
reg add "HKCU\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v "MaxConnectionTime" /t REG_DWORD /d 10800000 /f
:: 6 Stunden
reg add "HKCU\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v "MaxConnectionTime" /t REG_DWORD /d 21600000 /f
:: 8 Stunden
reg add "HKCU\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v "MaxConnectionTime" /t REG_DWORD /d 28800000 /f
:: 12 Stunden
reg add "HKCU\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v "MaxConnectionTime" /t REG_DWORD /d 43200000 /f
:: 16 Stunden
reg add "HKCU\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v "MaxConnectionTime" /t REG_DWORD /d 57600000 /f
:: 18 Stunden
reg add "HKCU\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v "MaxConnectionTime" /t REG_DWORD /d 64800000 /f
:: 1 Tag
reg add "HKCU\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v "MaxConnectionTime" /t REG_DWORD /d 86400000 /f
:: 2 Tage
reg add "HKCU\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v "MaxConnectionTime" /t REG_DWORD /d 172800000 /f
:: 3 Tage
reg add "HKCU\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v "MaxConnectionTime" /t REG_DWORD /d 259200000 /f
:: 4 Tage
reg add "HKCU\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v "MaxConnectionTime" /t REG_DWORD /d 345600000 /f
:: 5 Tage
reg add "HKCU\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v "MaxConnectionTime" /t REG_DWORD /d 432000000 /f
PowerShell
# Gemeinsam: Schlüssel erstellen
New-Item -Path 'HKCU:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services' -Force | Out-Null

# Optionen (nur eine verwenden)
# Nie
New-ItemProperty -Path 'HKCU:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services' -Name 'MaxConnectionTime' -PropertyType DWord -Value 0 -Force | Out-Null
# 1 Minute
New-ItemProperty -Path 'HKCU:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services' -Name 'MaxConnectionTime' -PropertyType DWord -Value 60000 -Force | Out-Null
# 5 Minuten
New-ItemProperty -Path 'HKCU:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services' -Name 'MaxConnectionTime' -PropertyType DWord -Value 300000 -Force | Out-Null
# 10 Minuten
New-ItemProperty -Path 'HKCU:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services' -Name 'MaxConnectionTime' -PropertyType DWord -Value 600000 -Force | Out-Null
# 15 Minuten
New-ItemProperty -Path 'HKCU:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services' -Name 'MaxConnectionTime' -PropertyType DWord -Value 900000 -Force | Out-Null
# 30 Minuten
New-ItemProperty -Path 'HKCU:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services' -Name 'MaxConnectionTime' -PropertyType DWord -Value 1800000 -Force | Out-Null
# 1 Stunde
New-ItemProperty -Path 'HKCU:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services' -Name 'MaxConnectionTime' -PropertyType DWord -Value 3600000 -Force | Out-Null
# 2 Stunden
New-ItemProperty -Path 'HKCU:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services' -Name 'MaxConnectionTime' -PropertyType DWord -Value 7200000 -Force | Out-Null
# 3 Stunden
New-ItemProperty -Path 'HKCU:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services' -Name 'MaxConnectionTime' -PropertyType DWord -Value 10800000 -Force | Out-Null
# 6 Stunden
New-ItemProperty -Path 'HKCU:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services' -Name 'MaxConnectionTime' -PropertyType DWord -Value 21600000 -Force | Out-Null
# 8 Stunden
New-ItemProperty -Path 'HKCU:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services' -Name 'MaxConnectionTime' -PropertyType DWord -Value 28800000 -Force | Out-Null
# 12 Stunden
New-ItemProperty -Path 'HKCU:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services' -Name 'MaxConnectionTime' -PropertyType DWord -Value 43200000 -Force | Out-Null
# 16 Stunden
New-ItemProperty -Path 'HKCU:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services' -Name 'MaxConnectionTime' -PropertyType DWord -Value 57600000 -Force | Out-Null
# 18 Stunden
New-ItemProperty -Path 'HKCU:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services' -Name 'MaxConnectionTime' -PropertyType DWord -Value 64800000 -Force | Out-Null
# 1 Tag
New-ItemProperty -Path 'HKCU:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services' -Name 'MaxConnectionTime' -PropertyType DWord -Value 86400000 -Force | Out-Null
# 2 Tage
New-ItemProperty -Path 'HKCU:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services' -Name 'MaxConnectionTime' -PropertyType DWord -Value 172800000 -Force | Out-Null
# 3 Tage
New-ItemProperty -Path 'HKCU:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services' -Name 'MaxConnectionTime' -PropertyType DWord -Value 259200000 -Force | Out-Null
# 4 Tage
New-ItemProperty -Path 'HKCU:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services' -Name 'MaxConnectionTime' -PropertyType DWord -Value 345600000 -Force | Out-Null
# 5 Tage
New-ItemProperty -Path 'HKCU:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services' -Name 'MaxConnectionTime' -PropertyType DWord -Value 432000000 -Force | Out-Null