Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automatically Log Of User at Specific Time

Status
Not open for further replies.

cranebill

IS-IT--Management
Jan 4, 2002
1,113
0
0
US
How would one go about doing this?

Bill
 
Go here and download shutdown.exe (freeware)
Then go to Settings, Control Panel, Scheduled Tasks and add a scheduled task to run shutdown.exe at your scheduled time. Then edit the task and add the switch -l to do a logoff (c:\whateverdirectory\shutdown.exe -l).
 
To restrict a users logon hours use the net user command. These commands are used fromt the Command Prompt.

Below are some examples:

net user brendon /time:M-F,08:00-17:00

net user brendon /time:M-F,8am-5pm

net user jane /time:M,4am-5pm;T,1pm-3pm;W-F,8:00-17:00

net user matt /time:all (this one means this user can always log on)



Note:You can only restrict when a user can log on to the system. On a stand alone computer, there is no way, currently, to force a user to log off when their hours expire.

 
You could with the GPedit tool force a aut logoff when the net user time has expired.

Jörgen Hjärtenflo
MCT 2003
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top