1

Is it possible to retrieve from a RDS server de user session list and show it on a asp.net webpage.

My main goal is to give a page where the users can logout their sessions when the sessions are "stucked".

Kara
  • 6,115
  • 16
  • 50
  • 57
Baldroega
  • 7
  • 2

1 Answers1

0

You can get the session list and logout users from the command line:

qwinsta /server:yourserver

logoff /server:yourserver 1 /v

So, you could use Process.Start() to run these commands from your web application.

jrummell
  • 42,637
  • 17
  • 112
  • 171
  • Humm, and how can i manipulate the data from received from those commands? – Baldroega Oct 01 '14 at 13:42
  • See this question http://stackoverflow.com/questions/4291912/process-start-how-to-get-the-output or http://stackoverflow.com/questions/285760/how-to-spawn-a-process-and-capture-its-stdout-in-net – jrummell Oct 01 '14 at 13:52