Set time limit for logoff of RemoteApp sessions: registry value RemoteAppLogoffTimeLimit (HKCU Terminal Services)UserHKCU\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services

Policy ID
TS_SESSIONS_RemoteApp_End_Timeout
Scope
User Configuration
Supported on
At least Windows Server 2008
Source
Administrative Templates (.admx) for Windows 11 2026 Update (26H2) (version 1.0)
Category
Windows Components › Remote Desktop Services › Remote Desktop Session Host › Session Time Limits

Registry

RemoteAppLogoffTimeLimit

REG_SZUser
Disabled value
0
Apply with .reg · CMD · PowerShell
Disabled
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services]
"RemoteAppLogoffTimeLimit"="0"
CMD · Disabled
reg add "HKCU\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v "RemoteAppLogoffTimeLimit" /t REG_SZ /d 0 /f
PowerShell · Disabled
New-Item -Path 'HKCU:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services' -Force | Out-Null
New-ItemProperty -Path 'HKCU:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services' -Name 'RemoteAppLogoffTimeLimit' -PropertyType String -Value '0' -Force | Out-Null

RemoteAppLogoffTimeLimit

REG_DWORDUser
Enabled value
Depends on the option value
Element
RemoteApp session logoff delay:
Options
ItemStored value
Immediately0
1 minute60000
5 minutes300000
10 minutes600000
15 minutes900000
30 minutes1800000
1 hour3600000
2 hours7200000
3 hours10800000
6 hours21600000
8 hours28800000
12 hours43200000
16 hours57600000
18 hours64800000
1 day86400000
2 days172800000
3 days259200000
4 days345600000
5 days432000000
Apply with .reg · CMD · PowerShell
.reg
Windows Registry Editor Version 5.00

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

; Options (use only one)
; Immediately
"RemoteAppLogoffTimeLimit"=dword:00000000
; 1 minute
"RemoteAppLogoffTimeLimit"=dword:0000ea60
; 5 minutes
"RemoteAppLogoffTimeLimit"=dword:000493e0
; 10 minutes
"RemoteAppLogoffTimeLimit"=dword:000927c0
; 15 minutes
"RemoteAppLogoffTimeLimit"=dword:000dbba0
; 30 minutes
"RemoteAppLogoffTimeLimit"=dword:001b7740
; 1 hour
"RemoteAppLogoffTimeLimit"=dword:0036ee80
; 2 hours
"RemoteAppLogoffTimeLimit"=dword:006ddd00
; 3 hours
"RemoteAppLogoffTimeLimit"=dword:00a4cb80
; 6 hours
"RemoteAppLogoffTimeLimit"=dword:01499700
; 8 hours
"RemoteAppLogoffTimeLimit"=dword:01b77400
; 12 hours
"RemoteAppLogoffTimeLimit"=dword:02932e00
; 16 hours
"RemoteAppLogoffTimeLimit"=dword:036ee800
; 18 hours
"RemoteAppLogoffTimeLimit"=dword:03dcc500
; 1 day
"RemoteAppLogoffTimeLimit"=dword:05265c00
; 2 days
"RemoteAppLogoffTimeLimit"=dword:0a4cb800
; 3 days
"RemoteAppLogoffTimeLimit"=dword:0f731400
; 4 days
"RemoteAppLogoffTimeLimit"=dword:14997000
; 5 days
"RemoteAppLogoffTimeLimit"=dword:19bfcc00
CMD
:: Options (use only one)

:: Immediately
reg add "HKCU\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v "RemoteAppLogoffTimeLimit" /t REG_DWORD /d 0 /f
:: 1 minute
reg add "HKCU\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v "RemoteAppLogoffTimeLimit" /t REG_DWORD /d 60000 /f
:: 5 minutes
reg add "HKCU\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v "RemoteAppLogoffTimeLimit" /t REG_DWORD /d 300000 /f
:: 10 minutes
reg add "HKCU\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v "RemoteAppLogoffTimeLimit" /t REG_DWORD /d 600000 /f
:: 15 minutes
reg add "HKCU\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v "RemoteAppLogoffTimeLimit" /t REG_DWORD /d 900000 /f
:: 30 minutes
reg add "HKCU\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v "RemoteAppLogoffTimeLimit" /t REG_DWORD /d 1800000 /f
:: 1 hour
reg add "HKCU\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v "RemoteAppLogoffTimeLimit" /t REG_DWORD /d 3600000 /f
:: 2 hours
reg add "HKCU\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v "RemoteAppLogoffTimeLimit" /t REG_DWORD /d 7200000 /f
:: 3 hours
reg add "HKCU\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v "RemoteAppLogoffTimeLimit" /t REG_DWORD /d 10800000 /f
:: 6 hours
reg add "HKCU\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v "RemoteAppLogoffTimeLimit" /t REG_DWORD /d 21600000 /f
:: 8 hours
reg add "HKCU\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v "RemoteAppLogoffTimeLimit" /t REG_DWORD /d 28800000 /f
:: 12 hours
reg add "HKCU\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v "RemoteAppLogoffTimeLimit" /t REG_DWORD /d 43200000 /f
:: 16 hours
reg add "HKCU\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v "RemoteAppLogoffTimeLimit" /t REG_DWORD /d 57600000 /f
:: 18 hours
reg add "HKCU\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v "RemoteAppLogoffTimeLimit" /t REG_DWORD /d 64800000 /f
:: 1 day
reg add "HKCU\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v "RemoteAppLogoffTimeLimit" /t REG_DWORD /d 86400000 /f
:: 2 days
reg add "HKCU\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v "RemoteAppLogoffTimeLimit" /t REG_DWORD /d 172800000 /f
:: 3 days
reg add "HKCU\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v "RemoteAppLogoffTimeLimit" /t REG_DWORD /d 259200000 /f
:: 4 days
reg add "HKCU\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v "RemoteAppLogoffTimeLimit" /t REG_DWORD /d 345600000 /f
:: 5 days
reg add "HKCU\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v "RemoteAppLogoffTimeLimit" /t REG_DWORD /d 432000000 /f
PowerShell
# Common: create the key
New-Item -Path 'HKCU:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services' -Force | Out-Null

# Options (use only one)
# Immediately
New-ItemProperty -Path 'HKCU:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services' -Name 'RemoteAppLogoffTimeLimit' -PropertyType DWord -Value 0 -Force | Out-Null
# 1 minute
New-ItemProperty -Path 'HKCU:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services' -Name 'RemoteAppLogoffTimeLimit' -PropertyType DWord -Value 60000 -Force | Out-Null
# 5 minutes
New-ItemProperty -Path 'HKCU:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services' -Name 'RemoteAppLogoffTimeLimit' -PropertyType DWord -Value 300000 -Force | Out-Null
# 10 minutes
New-ItemProperty -Path 'HKCU:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services' -Name 'RemoteAppLogoffTimeLimit' -PropertyType DWord -Value 600000 -Force | Out-Null
# 15 minutes
New-ItemProperty -Path 'HKCU:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services' -Name 'RemoteAppLogoffTimeLimit' -PropertyType DWord -Value 900000 -Force | Out-Null
# 30 minutes
New-ItemProperty -Path 'HKCU:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services' -Name 'RemoteAppLogoffTimeLimit' -PropertyType DWord -Value 1800000 -Force | Out-Null
# 1 hour
New-ItemProperty -Path 'HKCU:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services' -Name 'RemoteAppLogoffTimeLimit' -PropertyType DWord -Value 3600000 -Force | Out-Null
# 2 hours
New-ItemProperty -Path 'HKCU:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services' -Name 'RemoteAppLogoffTimeLimit' -PropertyType DWord -Value 7200000 -Force | Out-Null
# 3 hours
New-ItemProperty -Path 'HKCU:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services' -Name 'RemoteAppLogoffTimeLimit' -PropertyType DWord -Value 10800000 -Force | Out-Null
# 6 hours
New-ItemProperty -Path 'HKCU:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services' -Name 'RemoteAppLogoffTimeLimit' -PropertyType DWord -Value 21600000 -Force | Out-Null
# 8 hours
New-ItemProperty -Path 'HKCU:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services' -Name 'RemoteAppLogoffTimeLimit' -PropertyType DWord -Value 28800000 -Force | Out-Null
# 12 hours
New-ItemProperty -Path 'HKCU:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services' -Name 'RemoteAppLogoffTimeLimit' -PropertyType DWord -Value 43200000 -Force | Out-Null
# 16 hours
New-ItemProperty -Path 'HKCU:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services' -Name 'RemoteAppLogoffTimeLimit' -PropertyType DWord -Value 57600000 -Force | Out-Null
# 18 hours
New-ItemProperty -Path 'HKCU:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services' -Name 'RemoteAppLogoffTimeLimit' -PropertyType DWord -Value 64800000 -Force | Out-Null
# 1 day
New-ItemProperty -Path 'HKCU:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services' -Name 'RemoteAppLogoffTimeLimit' -PropertyType DWord -Value 86400000 -Force | Out-Null
# 2 days
New-ItemProperty -Path 'HKCU:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services' -Name 'RemoteAppLogoffTimeLimit' -PropertyType DWord -Value 172800000 -Force | Out-Null
# 3 days
New-ItemProperty -Path 'HKCU:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services' -Name 'RemoteAppLogoffTimeLimit' -PropertyType DWord -Value 259200000 -Force | Out-Null
# 4 days
New-ItemProperty -Path 'HKCU:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services' -Name 'RemoteAppLogoffTimeLimit' -PropertyType DWord -Value 345600000 -Force | Out-Null
# 5 days
New-ItemProperty -Path 'HKCU:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services' -Name 'RemoteAppLogoffTimeLimit' -PropertyType DWord -Value 432000000 -Force | Out-Null