TERMINAL SERVER LOGIN TIMES

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Somebody has told me that there is a way to set up login times on a terminal
server, so for example you could say between 8-9 and it resets any
connections that may be logged in after that time.

Does anybody know how to do this? or if it can be done?
 
You can enforce logon hours in each user account, but those will
affect also the logon hours on users workstations. If that is not
what you want, you could use this approach:

Schedule a batchfile to run at 08:00.
Include these commands in the batch file:

REM disable new logons
change logon /disable
REM warn users
msg * /TIME:60 System is closing for maintenance, log off now!!
REM reset all sessions
for /F "tokens=2" %%A in ('qwinsta ^| find /i "listen"') do echo y
| rwinsta %%A

Schedule a batchfile to run at 09:00, which includes:

REM enable new logons
change logon /enable

Note that by resetting sessions, users will loose unsaved data!
 
Back
Top