Logoff users and/or reboot computers using GPO

Posted on 2012-08-30
Last Modified: 2012-09-18
Is there any way to forcibly log users off PC's at a specific time/day (e.g. 7pm on a Saturday) using GPO's?  Alternatively or optionally can you force a reboot at a specific time/day using GPO's.
Question by:EQCIT
    LVL 4

    Expert Comment

    Logon hours needs to be set in the users' account, but you can force logoff through group policy as describe in this article:

    As for rebooting you can utilize the schtasks command through their login script like this:
    schtasks /create /ru <administrator> /rp <password> /sc dialy /st 23:59:00 /tn shutdown /tr "shutdown /t 0 /r"
    But that will require you to put a password in the login script unless the users have admin rights on their workstation.

    Alternatively you can create a schedule on your server that reboots all workstations on the LAN by using the tsshutdn or shutdown command (depending on your server version).  Just export all your workstations from ADUC into a text file and prepend the shutdown command to each line.
    LVL 52

    Accepted Solution


    The policy jekautz mentioned does no local logoff but (as described) causes client sessions with the SMB server to be forcibly disconnected when the client's logon hours expire.

    What you are looking for is a scheduled task (that can be deployed using grozup policy preferences)
    user: system, password:blank [no, this is no security risk but by design]. Trigger: daily, 7pm.  Action: rwinsta console
    That's all.

    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    Join & Write a Comment

    Scenario:  You do full backups to a internal hard drive in either product (SBS or Server 2008).  All goes well for a very long time.  One day, backups begin to fail with a message that the disk is full.  Your disk contains many, many more backups th…
    Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
    This Micro Tutorial will give you a basic overview of Windows DVD Burner through its features and interface. This will be demonstrated using Windows 7 operating system.
    The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…

    734 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

    24 Experts available now in Live!

    Get 1:1 Help Now