If you share your computer with multiple people, you can use this guide to set time restrictions to their accounts using Command Prompt on Windows 10.

When you share your computer running Windows 10 with other users, you can use your Microsoft account to control various aspects of a particular account, including web browsing and app restrictions, and set account sign in limits. However, the account administration is only possible if it's created as a Child account and using a Microsoft account.

If you must share your device with other people using a local account, the operating system doesn't offer a way to set time restrictions to an account -- at least it doesn't make it easy. Fortunately, Windows 10 like in previous versions includes a command you can use to limit access to a local account.

In this Windows 10 guide, we'll walk you through the steps to set limits to a local account when sharing a device with other people.

How to set limits to a local account

  1. Use the Windows key + X keyboard shortcut to open the Power User menu and select Command Prompt (admin).
  2. Type the following command to get a list of all the accounts on your computer and press Enter:

    net user

  3. Enter the following command and press Enter:

    net user USERACCOUNT /times:DAYS, TIME

    In the command mentioned above, you must replace "USERACCOUNT" with the name of the account you want to set time limits. You also need to replace "DAYS" and "TIME" with your specific settings. For example, you can adjust the number of days by using: M, T, W, Th, F, Sa, or Su. And for the time, you'll need to use 24-hour format.

    In addition, you can also set multiple time restrictions using a semicolon.

    Here's an example of the command setting restrictions from Monday to Wednesday from 9 am to 4 pm, and on Thursday from 11 am to 8 pm:

    net user WCUser /times:M-W,9:00-16:00;T,11:00-20:00

Once you completed the steps, the user will only be able to sign in only within the allowed times.

To view the current logon hours allowed for the account, do the following:

  1. Use the Windows key + X keyboard shortcut to open the Power User menu and select Command Prompt (admin).
  2. Type the following command and press Enter:

    net user USERACCOUNT

    Note: Remember to replace "USERACCOUNT" with the name of the account you want to view its settings.

To remove the time limits, do the following:

  1. Use the Windows key + X keyboard shortcut to open the Power User menu and select Command Prompt (admin).
  2. Type the following command and press Enter:

    net user USERACCOUNT /times:all

    Note: Remember to replace "USERACCOUNT" with the name of the account you want to remove the sign in restrictions.

Keep in mind that signed in users won't get kicked out of their accounts in the event they signed in within the allowed time. This is only to prevent users from accessing an account outside of the time limits.

More Windows 10 resources

For more help articles, coverage, and answers on Windows 10, you can visit the following resources: