Share via

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

Windows for business | Windows Client for IT Pros | Directory services | Active Directory
0 comments No comments

1 answer

Sort by: Most helpful
  1. Anonymous
    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.

    Was this answer helpful?

    0 comments No comments

Your answer

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