WMI查询在远程服务器上登录的当前用户 [英] WMI to query current users logged in on a remote server
问题描述
大家好......
我不知道我的问题是否属于这里,但我会给它尝试:)。
昨天有一位客户打电话给我,因为他无法进入服务器,因为终端服务器会话被最大化了。 / p>
他告诉我,我是否可以看一下并告诉他谁已连接。
我使用tsadmin远程进入服务器。 exe并查看用户,自5天前登录的用户1(他打开了会话)和断开连接的用户2(未注销)。
我的问题是......有没有办法使用WMI来查看这些信息?谁被淹没,因为服务器可以拥有的最长会话次数。
非常感谢!!!
问候。
Francisco。
PS:抱歉我的英文不好:)
我发现了这个:
您可以使用这些WQL查询来使用自定义WMI传感器
,具体取决于操作系统......
2003
总会话数
从Win32_PerfFormattedData_TermService_TerminalServices中选择TotalSessions
活动会话
SELECT ActiveSessions FROM Win32_PerfFormattedData_TermService_TerminalServices
2008
总会话数
从Win32_TerminalService中选择TotalSessions
活动会话
从Win32_PerfFormattedData_LocalSessionManager_TerminalServices中选择ActiveSessions
那会给我一半他需要信息:)但不是谁登录
Hi guys...
I don't know if my question belongs in here but i'll give it a try :).
Yesterday a customer called me because he couldn't enter a server because the terminal server sessions were maxed out.
He told me if i could take a look at that and to tell him who was connected.
I've enter the server remotely using tsadmin.exe and saw to users, user 1 that was logged on since 5 days ago (he left the session open) and user 2 that was disconnected (not logged off).
My question is... Is there a way using WMI to see this information?. Who is looged in, since when and the max sessions that the server can have.
Thanks so much!!!
Regards.
Francisco.
PS: Sorry for my bad english :)
解决方案I've found this:
you could use a custom WMI sensor using these WQL querys
depending on the OS...
2003
Total Sessions
SELECT TotalSessions FROM Win32_PerfFormattedData_TermService_TerminalServices
Active Sessions
SELECT ActiveSessions FROM Win32_PerfFormattedData_TermService_TerminalServices
2008
Total Sessions
SELECT TotalSessions FROM Win32_TerminalService
Active Sessions
SELECT ActiveSessions FROM Win32_PerfFormattedData_LocalSessionManager_TerminalServices
That will give me half the info needed :) but not who is logged in
这篇关于WMI查询在远程服务器上登录的当前用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文