New-adgroup

From WikiWiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
New-ADGroup  -Name Branch1Employees  -SamAccountName Branch1Employees -GroupCategory Security -GroupScope Universal -Path "CN=Users,DC=Fabrikam,DC=Com"


$groups=@(
"group1",
"group2",
"group3",
"group4",
)
$groups | %{New-ADGroup -Name $_  -SamAccountName $_ -GroupCategory Security -GroupScope Universal -Path "OU=groups,DC=corp,DC=contoso,DC=lcl"}