MarlonRicardo-8326 avatar image
0 Votes"
MarlonRicardo-8326 asked LimitlessTechnology-2700 answered

Is it possible to set a personalized time to lock the screen on windows by users?

Hi guys!

I want to know if it's possible to set a time by users to log off from Windows 10 when the time's up, for example, the user have from 8am to 9am to use the PC, and this time finished, the PC just log out. I've used already the "net user user /time:" in order to permit them to log in, but when the time is up, windows doesn't log out. Is there anything I can do?

· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

If system just log out, then they would be able to login again, do you want to prevent them from login?
There is a functionality in Microsoft Family Safety, but it is not application in organizations.
You could achieve this with scripting and using task schedule like you create logout command and then create a task to run in the time you want.

0 Votes 0 ·

The case is, I have 4 people at home and I want to set a time for them to use the PC. For example:
User A is allowed to use the PC from 8am to 10am, so it can only access the computer during this period, since it's already using it during these 2 hours, and it is logged in, the PC, by looking to his username, log him out and when it's 10am. Is that possible?

0 Votes 0 ·
Reza-Ameri avatar image Reza-Ameri MarlonRicardo-8326 ·

Are they domain joined device?
You may do this using scripting, may be consider Windows PowerShell and you may create automatic scripts to logout system at the specific time and then disable the account and enable it on the other time (when they permit to use the PC).
Do you have any other account like administrator on those devices?

0 Votes 0 ·

1 Answer

LimitlessTechnology-2700 avatar image
0 Votes"
LimitlessTechnology-2700 answered

Hi MarlonRicardo-8326,

The first step in configuring the policy mentioned above is to set the permitted logon hours for individual users. This can be done by following the steps given below:

Open Active Directory Users and Computers (ADUC).

Navigate to the user account for which the logon hours need to be restricted.

Right-click on the desired user account and select the Properties option.

In the Properties dialog box, under the Account tab, click on Logon Hours.

In the Logon Hours window, select the time duration for which logon is permitted and select the Logon denied option. The permitted hours are represented in blue and the restricted hours are represented in white.

Group Policy to Force Logoff Users after Logon Hours

After the permitted logon hours have been set for a user, the next step is to configure the group policy to disconnect users after their logon hours have expired. This can be done using the instructions given as follows.

Open the Group Policy Management Console (GPMC).

Right-click on Group Policy Objects and select the New option.

Enter an appropriate name for the new group policy (For example, Force Logoff) and click OK. Select the new GPO and add or remove users in the Security Filtering section.
Right-click on the GPO and click Edit.

Navigate to Computer Configurations > Policies > Windows Settings > Security Settings > Local Policies > Security Options.

From the right pane of the console, select the Network security: Force logoff when logon hours expire policy.

In the Security Policy Setting tab, select the Define this policy setting checkbox. Select the Enabled option and click OK.

Thus the users who are logged in after their valid logon hours will be disconnected from their sessions with the SMB server.

As a result, users are automatically logged off when their logon time expires.

--If the reply is helpful, please Upvote and Accept as answer--

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.