Log in and Log out

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there a group policy that can log off a user at a specific time every
evening and log them on at a particular time every morning ?
 
Is there a group policy that can log off a user at a specific time every
evening and log them on at a particular time every morning ?

No.

You can log a specific user off by scheduling a batch.
See tip 4086 » PsShutdown command-line freeware works on both the local and remote computers.
in the 'Tips & Tricks' at http://www.jsifaq.com

See tip 2890 » LoggedOn freeware locates where a user is logged on or who is logged onto a local or remote computer.

@echo off
setlocal
set user=Jennifer
set OK=N
for /f "Tokens=*" %%a in ('PsLoggedOn -L %user%^|find /i "%user%"') do (
set OK=Y
set line=%%a
)
if "%OK%" EQU "N" endlocal&goto :EOF
set line=%line:* onto =#%
set line=%line:#=%
set line=%line: locally.=%
PsShutdown -O \\%line%
endlocal

If autlogon (tip 4) is enabled, you could schedule a restart in the morning using PsShutdown, and that
will log the user on.


Jerold Schulman
Windows Server MVP
JSI, Inc.
http://www.jsiinc.com
http://www.jsifaq.com
 
Back
Top