Logging users off a terminal server

  • Thread starter Thread starter Joe
  • Start date Start date
J

Joe

Good day,

I have a main office in which users log on locally, and
remote offices in which other users connect via terminal
services, across a VPN, to my main office. I have users
that just don't get it when it comes to logging out each
evening. What I would like to do is use a script or
similar process to automatically boot them off each
evening before the backup runs (they are locking files
which are being skipped during the backup routine). I can
use the logoff rdp-tcp to get the terminal server users
off, but how do I get the local users logged out prior to
the backup cycle? I also want to give a warning in case
someone is actually logged in and working late in the
evening when I'll be running this process...

Any help would be welcomed!

- Joe
 
You could script shutdown.exe -m \\WorkstationName -r -f -60 with a scheduled task which would restart the remote machines by name, force the action even if a user is logged on with an application open or locked console, and give them 60 seconds (or whatever time you specify in seconds) to finish up before the machine reboots

You can set their user account logon time as denied during your backup window, but this won't log them off. So you can expire their logon time 30 minutes before your backup starts, run a script with the shutdown command that restarts the remote workstations. After the restart their logon time will have expired

There is an option is the Group Policy to disconnect users when their logon time expires but I've never seen it work successfully

Patrick Rous
Microsoft MVP - Terminal Serve
http://www.workthin.co

----- Joe wrote: ----

Good day

I have a main office in which users log on locally, and
remote offices in which other users connect via terminal
services, across a VPN, to my main office. I have users
that just don't get it when it comes to logging out each
evening. What I would like to do is use a script or
similar process to automatically boot them off each
evening before the backup runs (they are locking files
which are being skipped during the backup routine). I can
use the logoff rdp-tcp to get the terminal server users
off, but how do I get the local users logged out prior to
the backup cycle? I also want to give a warning in case
someone is actually logged in and working late in the
evening when I'll be running this process..

Any help would be welcomed

- Joe
 
Back
Top