Set allowed login times in Windows 11 or 10

Stefan
Set allowed login times in Windows 11 or 10

If you want to limit a user account to logging in on a specific day, range of days or time, this is possible.

In Windows 11 or 10, you can apply a login restriction to each user account that allows the user to log in on the specific day(s) or time(s). If you attempt to log in outside this period, this will not be possible with the limited user account.

Your account time is restricted

I imagine limiting logins might help a child account (a local account) for example. You can have one add child account, but this concerns a Microsoft account. If you don't want to use a Microsoft account, limiting your sign-in is also an option to ensure you can manage screen time this way.

You can also apply this to another account, namely for every user account that is active on the computer. This is how it works.

Set allowed login times in Windows 11 or 10

To set a login restriction for a user account, you can use the “net user” command with the “/time” argument.

Please note that I use a Dutch version of Windows. The commands are different in an English version.

To begin open a Command Prompt as administrator. In the Command Prompt you can query all user accounts as follows. We need these accounts to determine the username.

To query all user accounts, type:

net users

You will now see a list of all usernames. In this example I am using my Windows username.

Query all usernames in Windows via Command Prompt

Then, to apply a login restriction to one of the user accounts, type the following command.

net user <uwgebruikersnaam> /time:ma-vr,7:00-18:00

You will see the result “The command was completed” if it was successful.

Read also
Boot Windows 11 in safe mode

Apply login restriction to user account

Above you can see the command. Let me explain exactly what it says here.

/time

is the argument. Specifies that you want to apply a login restriction to the user account.

ma-vr

These are the days in which the registration restriction did not applies to. The day or series of days you can use are; Mon, Tue, Wed, Thurs, Fri, Sat, Sun. You do not have to specify a range, one day is also possible. You can register on this day or series of days.

7:00-18:00

Is the start and end time in which the registration restriction did not is active. Please note that there is a “-” dash in between and no space. Registration is therefore possible during this time period.

To view the login times for the account you can use the following command.

net user <uwgebruikersnaam>

You will then see in the “permitted login times” which days and time period you can log in to this computer with this user account.

permitted registration times

To remove all allowed login times for a user account you can run the following command.

net user <uwgebruikersnaam> /time:all

net user time all

I hope to have informed you with this. Thank you for reading!


Problem solved?


Help other people too.
Share this article on a website, forum or via social media.

Join our new computer forum for questions and computer help.
Do you have a computer question?

The email address will not be published. Required fields are marked with *