0 vote
Heloo,
We have a lot of RDS servers, and are used to kill porcess for a user.
In the remote programs shortcut, you show the ID of the session, if you could put the name of the user connected, it will be a great functionnality.
Regards
Hi,
Could you post a print screen of the dialog you are talking about?
Regards
David Hervieux
Hello,
I talk of remote program > remote process
Here's the screenshot
Regards
Capture.PNG
Thank you. I will assign this to one of our dev and we will check if we have this information in the returned value.
Regards
David Hervieux
Hello,
We can't retrieve this information from a remote machine.
Regards
Samuel Baker
Just in case I think you can't directly have this info.
But you can query the server for the session name
You get session ID by one command, and you need another command to map username to ID
For exemple qwinsta
I understand it' s a big change.
Thanks for looking.
The GetOwner method is not as reliable on a remote connection. It also adds a query to each process which takes a significant amount of time. We would have to add a details button or something similar to display it or take up a lot more time to the loading process. I could add an option to the list but I can't garantee the results.
Samuel Baker
Yes, but what i was thinking of was:
On a refresh: (or a button show user)
Get all process(once)-> table in memory
Get list of user and their ID (once) -> table in memory
Show on the GUI with the username (union of tables)
So you have just to query once
regards
The WTS/RDS api's should be able to do what you guys are talking about? (I've scripted some of this a long time ago in Citrix environments, but the core of it is still the same..)..
https://msdn.microsoft.com/en-us/library/aa383464(v=vs.85).aspx
The WTSEnumerateProcessesEx function should let you do this.. https://msdn.microsoft.com/en-us/library/ee621013(v=vs.85).aspx
Unless I'm just missing something.. (entirely possible :-)
David F.
Hello,
Although this could work we are currently using WMI so it is not usable with our architecture at this moment.
Regards
Samuel Baker
Without WMI is difficult to send the different credentials if the default user does not work.
Regards
David Hervieux
The query commands shouldn't require alternate credentials (i.e. quser.exe, qwinsta.exe, qprocess.exe).. these all use those WTS api calls, and I know the commands don't require any special authentication or alternate credential within the domain (regular user rights are plenty).. So, given that, you could theoretically use the stored credential for the connection to run those API calls and get the information..
David F.
Hi,
You mean that even a low privilege user is able to get this information? By the way it's not possible to use the credentials from the connection since their is no way to send the authentication information to the API.
Regards
David Hervieux
Yes.. a low privileged user can get that information easily.
The only thing I can think of as far as the stored user would be to establish an IPC connection to the server first with the stored credentials, and then you could issue the API calls, or submit the calls into the existing connected session, but I'm sure that would be harder..
The primary issue would be if the RDM session didn't have direct network access to the remote servers, and only had RDP/ICA access, since you wouldn't have any access beyond the RDP/ICA protocol. If that is the only access, you'd need a virtual channel setup, which obviously gets *way* more complicated, and introduces a server side agent that would be needed.
But a service installed on the same network as the RDP/Citrix farm, could gather that information and make it available to RDM.. That might be a great optional component..
David F.
Thank you for your information. I think we could add an option to use WMI or WTS or try the other option if the first one fail. What do you think?
Regards
David Hervieux
I think it'd be a great idea :-)
David F