Hi,
Is there a way to kill a Terminal Server session from vb.net?
I have to constantlly access our servers to reset ureser that get hung. I
would like to have a web interfave that I can access via my PDA/Phone. It
dose not have to be a wab page that does this. I could write to a queque
that is read by a windows servrice on the TS server and then reset the user.

Thanks.
George.

Re: How to kill a terminal server session (VB.NET) by Greg

Greg
Tue May 09 11:20:06 CDT 2006

You would probably be using the functions in wtsapi32.dll. Terminal services
can also be accessed through WMI
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/termserv/termserv/terminal_services_wmi_provider_classes.asp
but I am not sure if all of the functionality is exported.

Cheers,

Greg Young
MVP - C#
"George Lake" <g@lake.com> wrote in message
news:OptjVy2cGHA.4108@TK2MSFTNGP03.phx.gbl...
> Hi,
> Is there a way to kill a Terminal Server session from vb.net?
> I have to constantlly access our servers to reset ureser that get hung. I
> would like to have a web interfave that I can access via my PDA/Phone. It
> dose not have to be a wab page that does this. I could write to a queque
> that is read by a windows servrice on the TS server and then reset the
> user.
>
> Thanks.
> George.
>
>
>



Re: How to kill a terminal server session (VB.NET) by Greg

Greg
Tue May 09 19:03:20 CDT 2006

pinvoke.net has some good info under wtsapi32 including examples of getting
sessions WTSEnumerateSessions
http://www.pinvoke.net/default.aspx/wtsapi32.WTSEnumerateSessions, getting
session info WTSQuerySessionInformation
http://www.pinvoke.net/default.aspx/wtsapi32.WTSQuerySessionInformation, and
logging off a session WTSLogOffSession
http://www.pinvoke.net/default.aspx/wtsapi32.WTSEnumerateSessions

Cheers,

Greg Young
MVP - C#

"Greg Young" <DruckDruckGoose@hotmail.com> wrote in message
news:uaRf1R4cGHA.4900@TK2MSFTNGP02.phx.gbl...
> You would probably be using the functions in wtsapi32.dll. Terminal
> services can also be accessed through WMI
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/termserv/termserv/terminal_services_wmi_provider_classes.asp
> but I am not sure if all of the functionality is exported.
>
> Cheers,
>
> Greg Young
> MVP - C#
> "George Lake" <g@lake.com> wrote in message
> news:OptjVy2cGHA.4108@TK2MSFTNGP03.phx.gbl...
>> Hi,
>> Is there a way to kill a Terminal Server session from vb.net?
>> I have to constantlly access our servers to reset ureser that get hung. I
>> would like to have a web interfave that I can access via my PDA/Phone. It
>> dose not have to be a wab page that does this. I could write to a queque
>> that is read by a windows servrice on the TS server and then reset the
>> user.
>>
>> Thanks.
>> George.
>>
>>
>>
>
>