Link to home
Start Free TrialLog in
Avatar of EQCIT
EQCIT

asked on

Logoff users and/or reboot computers using GPO

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.
Avatar of jekautz
jekautz

Logon hours needs to be set in the users' account, but you can force logoff through group policy as describe in this article:
http://technet.microsoft.com/en-us/library/cc787251(v=WS.10).aspx

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.
ASKER CERTIFIED SOLUTION
Avatar of McKnife
McKnife
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial