Solved

Force logoff after certain hours through group policy

Posted on 2009-07-03
2
459 Views
Last Modified: 2012-05-07
Hi,

Is there a way through group policy to add a scheduled task that forces users to logoff at a certain time each night? I was able to create a .cmd script and put that in group policy. It is in the code section of this question. It didn't work. In event viewer there is an error that reads: The At2.job command failed to start due to the following error:
The system cannot find the file specified.

Any ideas?
at 22:00 /EVERY:M,T,W,Th,F,S,Su "shutdown -r -f -t 60 -c "Please close all programs - this PC will now restart"

Open in new window

0
Comment
Question by:trent_shane
2 Comments
 
LVL 30

Accepted Solution

by:
renazonse earned 250 total points
ID: 24772668
set the group policy: Network security: Force logoff when logon hours expire under Computer Configuration\Windows Settings\Security Settings\Local Policies\Security Options\

Then, in AD user properties goto Account >> Logon Hours and set the time the user is allowed to be logged in...

GPUPDATE /force afterwards and you should be all set.
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article covers how to install the Microsoft Windows Operating System (OS). What is covered in this article:  > Different Versions and Editions of the Windows OS  > Upgrading versus Fresh Installation of the OS           - Steps to take pr…
Ever notice how you can't use a new drive in Windows without having Windows assigning a Disk Signature?  Ever have a signature collision problem (especially with Virtual Machines?)  This article is intended to help you understand what's going on and…
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question