In this post we will see how you can restrict or set a Time Limit for any User Account in Windows 11/10, using the Net User command. Net User
is a command-line tool that helps system administrators add or modify user account behavior. We have already taken a look at some Net User commands for administrators, now let us see how to set time limits for Local Accounts.
Restrict or set Time Limit for User Accounts in Windows
While you can always use Parental Control or Microsoft Family Safety to do this and more. But in Windows 11/10, this built-in feature is tied to your Microsoft Account.
If you use a Local Account to sign in to your Windows 10 PC, then this command can be of great help to you.
Set login time restrictions for any user account in Windows
To begin, run the command prompt as administrator. Now copy-paste the following command and hit Enter, replacing username with the name of the user account:
net user username /times:M-F,10:00-22:00;Sa-Su,09:00-23:00
This means that the selected user will have access to his/her account from Monday to Friday, from the times 10 am to 10 pm, and on Saturday and Sunday from 9 am to 11 pm.
When you set a time limit for a particular user, then that user will be able to log in and access the PC only between those times. The usage syntax is as follows:
net user <username> /times:{day[-day][,day[-day]] ,time[-time][,time[-time]] [;] | all}
Specifies the times that users are allowed to use the computer. Time is limited to 1-hour increments. For the day values, you can spell out or use abbreviations (that is, M,T,W,Th,F,Sa,Su). You can use 12-hour or 24-hour notation for hours. If you use 12-hour notation, use AM and PM, or A.M. and P.M. The value all means a user can always log on. A null value (blank) means a user can never log on. Separate day and time with commas, and units of day and time with semicolons (for example, M,4AM-5PM;T,1PM-3PM). Do not use spaces when designating times.
In this way, you will be able to restrict a User’s logon hours on Windows PC.
You can use any of these syntaxes – 08:00 or 8am. For example:
net user username /time:M-F,08:00-17:00
net user username /time:M-F,8am-5pm
To restore default and allow the user access at all times, use:
net user username /time:all
Trust this works for you!
Now read: How to restrict the number of Login attempts in Windows?