Re: Restart service - Terminal Services

D

David Browne

Justin Rich said:
Since i have my server in a remote location i cant ever be at the keys.
Every now and then i will get disconnected twice from terminal services and
will be locked out. This is a pain to deal with because they dont ever seem
to time out.
Is there a way i can write an ASP page that will allow me to kick the
disconnected sessions off or a way to just restart the terminal service so
that it removes those sessions?

tsdiscon.exe will do this

RUN
tsdiscon 1 /SERVER:MYSERVER
tsdiscon 2 /SERVER:MYSERVER

To kick disconnect sessions 1 and 2. Be careful on XP you can disconnect
your own session.

David
 
J

Justin Rich

Other then i cant list them (guess i dont need to) that works great..
I will just enable telnet server.. and use that...
the other day i ran in to a bit of a deadlock..
i managed to screw up IIS which stopped all ASP scripts.. and i couldnt fix
it.. cuz i couldnt use terminal server...
so i think telnet will be my backup option..

Thanks
Justin
 
D

David Browne

Justin Rich said:
Other then i cant list them (guess i dont need to) that works great..
I will just enable telnet server.. and use that...
the other day i ran in to a bit of a deadlock..
i managed to screw up IIS which stopped all ASP scripts.. and i couldnt fix
it.. cuz i couldnt use terminal server...
so i think telnet will be my backup option..

You can just run it from ASPX like this


Dim p As New System.Diagnostics.Process()
p.StartInfo = New System.Diagnostics.ProcessStartInfo()
p.StartInfo.FileName = "cmd.exe"
p.StartInfo.Arguments = "/c c:\discon.cmd"
p.Start()
p.WaitForExit()

David
 

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

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top