Applies to: Windows Server 2019, Windows Server 2022, and Windows Server 2025.
Session time limits reduce abandoned sessions and resource consumption while preserving an appropriate user experience.
Prerequisites
- Administrative access to the affected Windows Server hosts.
- A tested backup or documented rollback point.
- An approved maintenance window for production systems.
Step-by-step configuration
- Define limits for active, disconnected, and idle sessions.
- Configure settings in a GPO linked only to the RDS session-host OU.
- Decide whether expired sessions disconnect or end.
- Pilot with representative applications.
- Communicate the policy before enforcement.
PowerShell and command-line procedure
gpupdate /force
gpresult /h C:\Temp\rds-time-limits.html
quser
Get-WinEvent -LogName "Microsoft-Windows-TerminalServices-LocalSessionManager/Operational" -MaxEvents 30
Verification
A pilot session follows the intended warning, disconnect, and logoff behavior without corrupting application work.
Rollback
Set the time-limit policies to Not Configured or restore prior values, refresh policy, and retest.
Security and operational guidance
- Apply least privilege and document every production change.
- Test the procedure in an isolated environment before broad deployment.
- Replace all example names, paths, and TEST-NET addresses with approved production values.
- Monitor relevant Windows event logs after the change.
Related resources
Deploy or manage Canadian Windows VPS infrastructure with networkmanager.info. Validate production decisions against the official Microsoft Windows Server documentation.