Log Off

Hope someone can help with this.
I need to force log-off to every one in the domain at a specified time everyday.
Actually, I would really like to force log off after a couple hours idle time, but I didn't think this one was possible.

Thank You,
LVL 12
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Just set logon hours in the user's profiles:

In AD users and computers....on user accounts...click on properties and then click on "account"...there you will see a tab for "logon hours".

In 2003, you can highlight all the users in an OU at the same time and make this setting for all of them at once.
"Actually, I would really like to force log off after a couple hours idle time"

You can do this with the Winexit screensaver provided in the server 03 resource kit

Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

Donnie4572Author Commented:
Thanks for reply.
This could be a problem since I do not want to prevet log-on but just to kick them off the system.
Suppose someone is working at the time I forced a log-off. Then, I need to allow that person to log right back on.

Is there a way to accomplish this without GP?
Set a short period during which the user is not allowed to be logged on. You can do it in 15 minute increments, maybe less (not currently somewhere I can check).

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Have you looked at Windows Control?

With the winexit screen saver that I mentioned...this can force a loggoff and won't prevent them from logging back on.

Other than that...I'm not sure of a way unless you go to thrid party software.
There is a simple solution to force logoff users from domain:

- on domain controller run "START\Settings\Control Panel\Administrative Tools\Computer Management"
- expand "System Tools"
- expand "Shared Folders"
- select "Sessions"
- now you can press F1 key to see help topics, check topic "Shared Folders\How To\Disconnect User or Users" for details and command prompt operations; or
- from main menu select "Action" and "Disconnect All Sessions"

You must be a member of the Administrators or Power Users group to use Shared Folders.


If you disconnect users who are accessing shared resources, they might lose data. You should warn connected users before you disconnect them
If you want to daily schedule logoff operation, write simple .bat or .cmd file using command prompt syntax of "net session /delete" and add it's execution in "Control Panel\Scheduled Tasks" panel. Good luck.
Donnie4572Author Commented:
I suppose I will have to use aflockhart suggesstion. I guess because it will take the least effort on my part.
Thanks for all the comments I could use any one of them so I will split points.
Thanks again,
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Server 2003

From novice to tech pro — start learning today.

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.