Many people are still wondering how come commands are still useful in Windows. You will see one of the benefits of using a command. Here is trick to restrict access in Windows without additional software and at no cost.
What is a “net user” command? Net user is a command which is used in the command console to do various user account related operations:
- add a new user account
- modify a user account
- display user account information
Syntax: To add a new account type: net user “account name” /ADD * (do not use the quotes). The asterisk is to prompt you to provide the password for the account.
Using “net user” solitary, with no parameters, you will get the list with all the users on the computer. To delete an account, just use the syntax with /DELETE parameter:
net user TEST /Delete
How to configure logon hours for a user? Now that you are familiarized with the command, it’s time to learn how to add parameters in order to limit logon access for a time interval.
Let’s suppose the account for which we want to define the time interval access already exists. The command will look like this:
net user “user account” /time:M-F,14:00-16:00
Replace the text between the quotes with the desired account. Using the above command line, the user has rights to access its account between 14 and 17 every day from Monday to Friday. In case your son/daughter comes home from school around two o’clock he/she will be able to logon until 16 o’clock (when you come back from work).
Please notice that only sharp values are accepted. You can choose any hour but not subdivisions like 14:15 or 15:36. You can even setup time intervals for different days as following:
net user softpedia /time:W,10am-5pm;T,2pm-3pm;F-Sa,9:00-16:00
One more thing, the week days’ abbreviations are M, T, W, Th, F, Sa, Su. It is your choice how you schedule the computer usage time.