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
 
Back
Top