Complete logoff in Active Directories.

Posted on 2007-10-09
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
    LVL 3

    Accepted Solution

    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

    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

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    The saying goes a bad carpenter blames his tools. In the Directory Services world a bad system administrator, well, even with the best tools they’re probably not going to become an all star.  However for the system admin who is willing to spend a li…
    This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
    This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…

    745 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

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now