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.
Popular Articles
Last viewed:
- ASP.NET Charting Control 3.5 fix for "Error executing child request for ChartImg.axd"
- Tutorial for Configuring Silverlight 4, Entity Framework and WCF RIA Services in Separate Component Assemblies (DLL’s)
- Configure Remote Access for SQL Server Express 2005
- Add a Composite Control to the Visual Studio Toolbox
- Install Windws 2003 Terminal Service Licenses (Remote Desktop)
- Deploy Crystal Reports 2008 Run-time on Remote Server
Recent comments
- Reply
1 day 19 hours ago - Thank you!
6 days 9 hours ago - Thanks!!
6 days 10 hours ago - Lotus Email Server Stop
1 week 19 hours ago - awesome article masssthhh
1 week 2 days ago - Awesome!
2 weeks 9 hours ago - get blank pdf
2 weeks 1 day ago - TXLDnoMyeLVmZKXPTJT
2 weeks 4 days ago - hPLvcrWMPCDOIpXDg
2 weeks 6 days ago - JijKgYDvBZXRZ
2 weeks 6 days ago

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.