Skip to content

Instantly share code, notes, and snippets.

@mikerodionov
Created February 14, 2019 13:56
Show Gist options
  • Save mikerodionov/c6b5551e7dd8af3802225a9893e57b96 to your computer and use it in GitHub Desktop.
Save mikerodionov/c6b5551e7dd8af3802225a9893e57b96 to your computer and use it in GitHub Desktop.
$count=0
$path="OU=Departments,DC=Denallix,DC=com"
$group_name_prefix="TestGroup"
while($count -ne 10){
$count=$count+1
New-ADGroup -Path $path -Name $group_name_prefix$count -GroupScope Global -GroupCategory Security
echo "Creating group: " $group_name_prefix$count
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment