Force Logoff at Certain Time


Is it possible to log off a user at a certain time.

Logon Restrictions have been enforced in Group policy for the user account.

If a user has been allowed to log onto the domain from 8am to 6pm what do i need to do to restrict that user from being able to log back on, even if that user leaves the computer on without shutting the machine down. If a user was to do this, the user will still have access to network resources. Basically i am after a solution, to force a user logon account to be disconnected at 6PM without the ability for that user to log back on.

From what i have read so far it is not possible.

I am interested in a windows solution and not a third party solution if this is possible.

I hope that this is clear if not please let me know

Thank you for your time.

Who is Participating?
Shift-3Connect With a Mentor Commented:
Use the Group Policy setting "Automatically log off users when logon time expires" under Computer Configuration\Windows Settings\Security Settions\Security Options.
its always possible - well almost

get a hold of psshutdown from sysinternals and create a small batch file which you run as a scheduled task..just use the logoff switch given in the readme
Micrsoft provided a utility (shutdown.exe) which does the same as PsShutdown (if you are only looking to use MS Tools):

PsSHutdown is more powerful however:

Hope this helps.
Improved Protection from Phishing Attacks

WatchGuard DNSWatch reduces malware infections by detecting and blocking malicious DNS requests, improving your ability to protect employees from phishing attacks. Learn more about our newest service included in Total Security Suite today!

If that doesn't work right then adjust the logoff interval with the command net accounts /forcelogoff:<minutes> /domain
Maybe the built-in shutdown command with the -t arguement
The link to "Autmatically log users off....", Provided by Shift-3 does not log the PC off - it simply disconnects the user from servers (logs the user off from any servers defined in the policy).  It is explained here:

To actually log the user off the PC, PsShutdown or Shutdown.exe must be used as described above.

Hope this helps.
yah psshutdown is an awesome tool - i would download the entire pstools packages considering ms bought sysinternals and eventually those tools wont be free
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.