Skip to content

Instantly share code, notes, and snippets.

@Retro2707
Created December 2, 2013 16:15
Show Gist options
  • Save Retro2707/7751971 to your computer and use it in GitHub Desktop.
Save Retro2707/7751971 to your computer and use it in GitHub Desktop.
Import-csv new-adgroup bulk group
$GroupNames = Import-Csv "c:\IT\GroupNames.csv"
Foreach ($Group in $GroupNames) {
$Name = $Group.Name
New-ADGroup -Name $Name -SamAccountName $Name -GroupCategory Security -GroupScope DomainLocal -DisplayName $Name -Path `
"OU=FileBox,OU=Domain Local Groups,OU=Security_Groups,OU=Global AD Management,OU=Mitchell Farrar Group,DC=DAL,DC=local"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment