【发布时间】:2015-12-24 15:42:43
【问题描述】:
SELECT TotalSessions FROM Win32_TerminalService
此计数始终减 1。如果服务器上可见 1 个用户,则计数显示为 2。
这是来自 MSDN
TotalSessions
Data type: uint32
Access type: Read-only
The total number of sessions on the current server. This includes both connected and disconnected sessions.
我知道我只能从总数中得到-1,但这真的是处理这个问题的正确方法吗?
为什么会看到额外的 +1 用户?
【问题讨论】: