Complete logoff in Active Directories.

Posted on 2007-10-09
Medium Priority
Last Modified: 2012-06-21
We have an Active Direcoiry network of 100 users, we need a way to logout users after 7pm.
Active directory login hours is not doing it.
We need a complete logout from user.
Any suggestions will help

Question by:fesit

Accepted Solution

fpcit earned 252 total points
ID: 20044228
you could use a tool like psshutdown or the windows shutdown tool.  Write a batch with a list of computers using the following syntax for the MS shutdown tool.

shutdown -l -m \\computername

One entry per machine.  

schedule the job to run from any server at 7:00 p.m.

If you have pstools from sysinternals you can use psshutdown with similar syntax but you can feed it a text file to populate the computer

psshutdown -O @file

theoretically log off the console user for each remote pc in the file

I say theoretically because I haven't feed psshutdown a file.  I typically just create a line for each entry.

LVL 10

Assisted Solution

Phadke_hemant earned 248 total points
ID: 20045431
for multiple machines, save all machine names in one comp.txt file and run the following command -
for /f %i in (C:\comp.txt) do shutdown /l /t 3 /m %i

Featured Post

Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

Question has a verified solution.

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

A hard and fast method for reducing Active Directory Administrators members.
How to deal with a specific error when using the Enable-RemoteMailbox cmdlet to create a mailbox in the cloud-based service, for an existing user in an on-premises Active Directory.
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Suggested Courses

850 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