Remove domain admins group from local administrators group

Richard Y 606 Reputation points
2022-03-19T14:25:24.697+00:00

Hi

Can we remove domain admins from local administrators group on all servers and workstation Tiers 1 and Tiers2 using powershell ?

Windows for business | Windows Client for IT Pros | Directory services | Active Directory
Windows for business | Windows Server | User experience | PowerShell
Windows for business | Windows Server | User experience | Other
0 comments No comments
{count} votes

Accepted answer
  1. Thameur-BOURBITA 36,261 Reputation points Moderator
    2022-03-19T14:34:07.893+00:00

    Hi,

    It's possible to use powershell to remove a user or group in local administrators group via this command : Remove-LocalGroupMember. The script must be launched regularly through scheduled task.

    If you want control the member of administrators group ,I recommend you to use GPO via restricted group of Group Policy Preference:

    184745-image.png

    You have ano

    Please don't forget to mark helpful reply as answer


0 additional answers

Sort by: Most helpful

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.