Remove domain admins group from local administrators group

Richard Y 481 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 Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
12,127 questions
Active Directory
Active Directory
A set of directory-based technologies included in Windows Server.
5,857 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,364 questions
0 comments No comments
{count} votes

Accepted answer
  1. Thameur-BOURBITA 32,506 Reputation points
    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