January 2015
Intermediate to advanced
230 pages
5h 4m
English
Previously, we have seen bulk creation of users using PowerShell. A similar requirement might come from creating security groups in bulk. The function given in the following code helps in creating groups in a bulk fashion. It creates a security group of a given scope (domain local, global, or universal) inside the default user's container by default. They can be created in different locations in the Active Directory structure by updating the $TargetOU variable's value with the DN of the OU where you want to create them:
Function Invoke-ADBulkGroup { [CmdletBinding()] Param( [Parameter(Mandatory=$true, Position = 0)] [String[]]$GroupName, [Parameter(Mandatory=$true, Position = 1)] [ValidateSet("DomainLocal","Global","Universal")] ...Read now
Unlock full access