Script

  • Thread starter Thread starter theonc
  • Start date Start date
T

theonc

Can anyone tell me a way to close sessions to remote
servers from batch file???
I already use the psfile command, but I would prefer to
close sessions not files.............
 
Can anyone tell me a way to close sessions to remote
servers from batch file???
I already use the psfile command, but I would prefer to
close sessions not files.............


You can use psExec to run net session \\ClientComputer /delete
on the remote server.
Get it at tip 4141 in the 'Tips & Tricks' at http://www.jsiinc.com

Jerold Schulman
Windows: General MVP
JSI, Inc.
http://www.jsiinc.com
 
Can anyone tell me a way to close sessions to remote
servers from batch file???
I already use the psfile command, but I would prefer to
close sessions not files.............

Both PsExec and PsService are available at www.sysinternals.com

Clay Calvert
(e-mail address removed)
Replace "W" with "L"
 
Thanks man.....

now for the hard part.... I would like to close ONLY the
IDLE session, say with IDLE TIME more than 15 min....

Any ideas ???????
 
now for the hard part.... I would like to close ONLY the
IDLE session, say with IDLE TIME more than 15 min....

Closing the IDLE prozess is not possible, but will be able to decrease
the processor utilization used by IDLE. Create a batch with

:runthisendless
copy c:\winnt\system32\*.* c:\temp\delthis
echo y|del c:\temp\delthis\*.*
goto :runthisendless

Run as often (parallel) as you want by using different directories and
watch IDLE.


Seriously:
IDLE is the process that will "run" when no other process is using the
system.
If you have to stop IDLE you have to reboot your machine.

Ciao, Walter
 
In said:
Closing the IDLE prozess is not possible, but will be able to
decrease the processor utilization used by IDLE. Create a batch
with

I think the OP is talking about SESSIONS and not processes.

OP may not be clear on "disconnected" session and "deleting" a
session. By default sessions are auto-disconnected when unused for
nn minutes. (configurable).

Or so I think FWIW.
 
Back
Top