By using net user commands at the Command Prompt, you can define the days and times a particular Windows user is allowed to login. This can be used by organizations to help prevent unauthorized access during off-hours.
Here’s an example of limiting access to Monday through Friday 8am to 6pm:
net user username password /times:M-F,08-18;
You can use the full spelling of days or use abbreviations: M,T,W,Th,F,Sa,Su.
You can use the 12-hour or 24-hour format for the times. To use the 12-hour format, specify AM or PM.
Use commas to separate day(s) from a time, and use semicolons to separate combinations of a day/time. For example, here’s how to specify Monday 8am through 6pm with a one hour lunch break between 11am and noon: M,8AM-11AM;M,12PM-6PM;
To specify a user can log on anytime, use “all”. A blank value means a user can never log on.