User Account Login - Limit hours

Active Directory allows limiting the logon hours of a user account through the GUI. This is done by selecting the user account and opening the properties for that user.

However, when a server does not have active directory installed, the logon hours cannot be specified through the GUI.



They can be set by going to the command prompt and using the net user command.

This blog was inspired by this link:
http://www.petri.co.il/set_local_user_logon_hours_in_windows_xp.htm

So just in case the link above goes bad here are some examples.

Type:
net user // Returns a list of all the users

Type:
net user TKestermont // Returns all the details about a particular user

Type:
net user TKestermont /time:S-F,08:00-18:00 // Limit the time that the user can login

Type:
net user /help // returns more command parameter information.

One interesting one was Expires. Which allows you to set the date that the account will expire.

Here's an example of using this command

Here's an example of using this command to expire a user account:

net user [username] /expires:01/01/2000

The format of the date is MM/DD/YYYY.