Assign Limited Custom Hours To Different Users (Windows)

by on October 29th, 2007

If your computer has multiple users and you want to assign limited custom hours to certain user then follow these instructions.

Go to Start > Run. Type cmd.
Enter the command net user /time:S-F,08:00-20:00. Here /time is used to specify login time. S-F denotes Saturday to Friday and the time has been specified in 24- hour format. Individual timing sets with the days of the week along with corresponding time can be defined using semi-colon separation, and AM/PM time. For example /time:M,4am-5pm;T,1pm-3pm;W-F,8:00-17:00.

To reset the timing restrictions, use /time:all. Whenever timings are associated with user accounts, make sure at least one administrator (with a strong password) is there without time limitations. Note that this method is useful for implementing restrictions on logins and will not force a user to log out.

In a networked environment, usage hours can be defined in the Active Directory, but this may not be specifically applicable in your case.

Go to Start > Programs > Accessories > System Tools >Scheduled Tasks.
Double click Add Scheduled Task.
When the Schedule Task wizard appears, press Next and then Browse.
Enter %windir%\system32\shutdown.exe

Select a name for the task.
Enter task frequency, for example daily and press Next.
Enter task timings, days, date and other settings, press Next.
Enter Windows account login information through which the task will be executed, press Next.
Check ‘open advanced properties’, press Finish.
In the Task tab’s Run filed, ad parameters –s –t 01 after the exe file shutdown.exe. S is for shutdown, and T is for timeout for shutdown.

For more information on Shutdown parameter, type Shutdown at command prompt. You can set shutdown schedule as you like using this method.


Share