大网数据广告活动
远程桌面与会话

Remote Desktop Service can't be restarted if Keep-Alive feature is enabled

· 52CE 我爱测

Discusses an issue where you can't restart the Remote Desktop Services (Terminal Services) if Keep-Alive is enabled.

This article provides a solution to an issue where you can't restart the Remote Desktop Services (Terminal Services) if Keep-Alive is enabled.

Original KB number:   2507353

Symptoms

If the RDP Keep-Alive feature is enabled on a Windows Server 2008 (or Windows Server 2008 R2) server, manually stopping the Remote Desktop Services service (Windows Server 2008 R2) or Terminal Services service (Windows Server 2008) will leave the server in an unstable state: restarting the service won't re-enable RDP functionality, and the server will hang during shutdown.

Cause

The keep-alive thread is started by the Remote Desktop Services (Terminal Services) service if Keep-Alive is enabled, however it runs in Kernel mode and therefore can't be ended automatically when the service stops.

Resolution

Don't attempt to stop or restart the Remote Desktop Services (Terminal Services) service if the RDP keep-alive mechanism is enabled.

More information

When Keep-Alive is enabled and the Remote Desktop Services (Terminal Services) service is stopped, its svchost.exe process will remain in the Task list, even though the service is reported to have stopped correctly. When the service is started again, a new svchost.exe will be started however the server won't accept incoming RDP connections because of inconsistency in the TermDD driver state.

The Keep-Alive feature can be enabled by Group Policy:

  • Windows Server 2008 R2

    Computer Configuration\Administrative Templates\Windows Components\Remote Desktop Services\Remote Desktop Session Host\Connections

    Configure Keep-Alive Connection Interval

  • Windows Server 2008

    Computer Configuration\Administrative Templates\Windows Components\Terminal Services\Terminal Server\Connections

    Configure Keep-Alive Connection Interval

To configure directly in the registry:

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server]
"KeepAliveInterval"=dword:00000001
"KeepAliveEnable"=dword:00000001

Source: Microsoft Learn / IT Pro troubleshooting by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / IT Pro troubleshooting
适用范围
- Supported versions of Windows Server · Source date 02/12/2026
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。