Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

log off terminal server users via batch file

Status
Not open for further replies.

bmeche

IS-IT--Management
Mar 1, 2003
69
0
0
US
I am looking for a way to log off all terminal server users, I cannot get these guys to log off and prevents us from getting a good backup, I would like to run a batch/script before the backup runs.

Any suggetions?

Bret
 
Use a group policy setting to force a logoff after your designated logon hours.

Set the problem users with a "Only able to log in during X hours" and then set the GPO to boot them after that time.

 
We had the same problem, but only needed to make sure a couple of programs were closed so the data files could be backed up properly. We didn't actually have to have everyone logged out.

I ended up using 'tskill' in a .bat file and using Scheduled Tasks to make sure these programs are closed for all users at a set time every night.

-----.bat file example-------
tskill /a outlook
tskill /a msaccess
-----------------------------

Not exactly what you asked but may come in handy :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top