Enumerate terminal servser sessions using C#.

  • Thread starter Thread starter Moses M
  • Start date Start date
M

Moses M

I am new to C#! I need to enumerate TS sessions (including sessions running
in non-application mode) using a C# application. Can this be done using a
"TS-WMI" provider? Any input will be appreciated!
Moses
 
TS WMI provider is for Windows 2003 server only, so if all of your servers
are 2003 server that approach would work.

Alternatively you could use the TS API methods; WTSOpenServer(),
WTSEnumerateSessions(), WTSQuerySessionInformation() etc by using DllImport.


Arild
 
Thanks for the input!
-- Moses

Arild Bakken said:
TS WMI provider is for Windows 2003 server only, so if all of your servers
are 2003 server that approach would work.

Alternatively you could use the TS API methods; WTSOpenServer(),
WTSEnumerateSessions(), WTSQuerySessionInformation() etc by using DllImport.


Arild
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top