PowerShell New-ADGroup

    #Group Scope option: DomainLocal, Global, Universal
    $GroupScope ="Global"
    
    $ServerName="PrimaryDC" 

    $Path = "OU=Hold,DC=JCR,DC=LOCAL"

    #-----List of group names to create---------
    $Groups= get-content C:\Temp\MyUser.txt
    
   
#----------Da Loop----------
    foreach ($group in $groups){              
        
       
#---------Group Creation-------
        New-ADGroup -Server $ServerName -Path $Path -Name $group -GroupScope $GroupScope -GroupCategory Security -ErrorAction Stop    
    }     
    

2020 | Scott W. Head  |  Sr. Systems Admin | Certified Microsoft Windows Server Administrator