How to apply logon hours to ALL Users in active directory

Ben daneshgar 1 Reputation point
2022-12-05T01:57:55.61+00:00

Hi,
I already know how to apply hours restriction in AD, but I'm wondering if anyone knows a way to apply that setting to all users in AD
I can't go one by one and apply the Login hours restriction one by one. I mean it does not make sense,
I even look into writing a Bat file but I was not successful honestly

I was wondering if anyone has the same experience and find a solution

Thanks

Windows for business | Windows Client for IT Pros | Directory services | Active Directory
{count} votes

1 answer

Sort by: Most helpful
  1. Anonymous
    2022-12-06T06:50:34.117+00:00

    Hello Bendaneshgar-9996,

    Thank you for posting in our Q&A forum.

    We can set logon hours on multiple AD user accounts at one time.

    1.Select multiple user accounts.
    267616-capture.png

    2.And select Properties and set logon users for these users.

    267636-capture11.png

    3.Set one of the following gpo settings for the computers that the AD users above logon based on your needs.

    Computer Configuration\Windows Settings\Security Settings\Local Policies\Security Options
    Network security: Force logoff when logon hours expire

    Computer Configuration\Windows Settings\Security Settings\Local Policies\Security Options
    Microsoft network server: Disconnect clients when logon hours expire.

    Similar thread
    https://social.technet.microsoft.com/Forums/windowsserver/en-US/380c5aad-bc6c-4a3b-ae6d-e07fe4d4d8a0/set-up-logon-hours-in-windows-server-2008r2-by-using-gpos

    https://www.manageengine.com/products/active-directory-audit/kb/how-to/how-to-set-logon-hours-in-active-directory.html

    Hope the information above is helpful.

    Best Regards,
    Daisy Zhou

    ===============================================

    If the Answer is helpful, please click "Accept Answer" and upvote it.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.