How disable user out of domain

Hami 0 Reputation points
2023-09-19T10:50:14.9366667+00:00

I wanna a gpo for inactive user when he out of domain with laptop can not log in and and user disabled

Active Directory
Active Directory
A set of directory-based technologies included in Windows Server.
6,547 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ian Xue 37,021 Reputation points Microsoft Vendor
    2023-10-05T06:17:06.4066667+00:00

    Hi Hami,

    Please create a GPO and navigate to Computer Configuration\Policies\Windows Settings\Scripts\Startup. Add a PowerShell scritp which runs Get-Localuser| Disable-LocalUser. This will disable all the local accounts on the computer.

    Best Regards,

    Ian Xue


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

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    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.