您是否希望了解如何使用组策略在 Windows 上一段时间不活动后断开远程桌面用户的连接? 在本教程中,我们将向您展示如何创建组策略,在 5 分钟的不活动状态后断开远程桌面用户的连接。
• Windows 2012 R2
• Windows 2016
• Windows 2019
• Windows 10
• Windows 7
硬件列表:
以下部分介绍用于创建本教程的设备列表。
上面列出的每一件硬件都可以在亚马逊网站上找到。
与 Windows 相关的教程:
在此页上,我们提供对与 Windows 相关的教程列表的快速访问。
教程 GPO – 不活动后断开远程桌面会话
在域控制器上,打开组策略管理工具。

创建新的组策略。

输入新组策略的名称。

在我们的示例中,新的 GPO 被命名为:MY-GPO。
在组策略管理屏幕上,展开名为”组策略对象”的文件夹。
右键单击新的组策略对象并选择”编辑”选项。

在组策略编辑器屏幕上,展开用户配置文件夹并找到以下项目。
Copy to Clipboard
访问名为”会话时间限制”的文件夹。

启用名为:为活动但空闲远程桌面服务会话设置时间限制。
选择非活动会话所需的时间限制。

在我们的示例中,配置了 5 分钟的不活动时间限制。
若要保存组策略配置,需要关闭组策略编辑器。
系统将在断开远程桌面会话前 2 分钟显示警告消息。

祝贺! 您已完成组策略配置,以在时间限制后断开远程桌面服务的空闲会话。
教程 GPO – 非活动远程桌面会话的时间限制。
在组策略管理屏幕上,您需要右键单击所需的组织单位,然后选择链接存在 GPO 的选项。

在我们的示例中,我们将将名为 MY-GPO 的组策略链接到域的根目录。

应用 GPO 后,您需要等待 10 或 20 分钟。
在此期间,GPO 将复制到其他域控制器。
在我们的示例中,我们使用 GPO 将时间限制配置为非活动远程桌面会话。