[英]Enumerate logon sessions remotely
I want to enumerate logon sessions on a remote host (citrix terminal server). 我想枚举远程主机 (citrix终端服务器) 上的登录会话 。 What I found so far is LsaEnumerateLogonSessions() / LsaGetLogonSessionData()
, but you can't call it remotely. 到目前为止,我发现的是LsaEnumerateLogonSessions() / LsaGetLogonSessionData()
,但是您不能远程调用它。
I read some docs about RPC, but if I understood it right, you need an extra application on the remote host that executes your functions (that's something I want to avoid). 我阅读了一些有关RPC的文档,但如果我理解正确的话,则需要在远程主机上执行该功能的其他应用程序(这是我要避免的事情)。
Is there a way to implement such a thing? 有办法实现这种事情吗? Maybe with the remote desktop api? 也许使用远程桌面api?
Another solution I found: http://msdn.microsoft.com/en-us/library/windows/desktop/aa370669%28v=vs.85%29.aspx 我发现了另一个解决方案: http : //msdn.microsoft.com/zh-cn/library/windows/desktop/aa370669%28v=vs.85%29.aspx
Other options include the WTS APIs: WTSEnumerateSessionsEx . 其他选项包括WTS API: WTSEnumerateSessionsEx 。 If you want to be Citrix specific you can also use the XenApp PowerShell SDK . 如果要特定于Citrix,也可以使用XenApp PowerShell SDK 。
使用Win32_LogonSession ,可以从远程计算机调用WMI。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.