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

Marlon Ricardo 1 Reputation point
2022-05-10T12:14:17.357+00:00

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?

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
11,156 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Limitless Technology 39,496 Reputation points
    2022-05-13T07:22:11.073+00:00

    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--

    0 comments No comments