Is it possible to add a local group on all Domain Computers via the Domain controller

Ioann 61 Reputation points
2022-01-13T18:11:05.423+00:00

Is it possible to use the Domain Controller to add local groups to all Domain Computers

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

2 additional answers

Sort by: Most helpful
  1. Dave Patrick 426.1K Reputation points MVP
    2022-01-13T18:19:05.487+00:00

    You can follow along here using any local groups.
    http://woshub.com/add-domain-users-local-admin-group-gpo/

    --please don't forget to upvote and Accept as answer if the reply is helpful--


  2. Andreas Baumgarten 96,266 Reputation points MVP
    2022-01-19T12:40:26.203+00:00

    Hi @Ioann ,

    if you want to create the local group automatically on each domain member computer this should be possible via GPO and a startup PowerShell script.
    In the Power Shell script it's possible to check if the local group already exists and if not create the local group.

    A simple script could look like this:

    $newGrpName = "Test"  
    if (Get-LocalGroup | Where-Object { $_.Name -eq $newGrpName }) {  
        Write-Output = "Localgroup $newGrpName already exists"  
    }  
    else {  
        Write-Output = "Creating new localgroup $newGrpName"  
        New-LocalGroup -Name $newGrpName -Description "Group automatically created"  
    }  
    

    ----------

    (If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)

    Regards
    Andreas Baumgarten