Upload files to "windows-ad/populate_ad"
This commit is contained in:
parent
7ca369aa9f
commit
66c942f679
6 changed files with 3140 additions and 0 deletions
24
windows-ad/populate_ad/create_groups.ps1
Normal file
24
windows-ad/populate_ad/create_groups.ps1
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
# website: activedirectorypro.com
|
||||
|
||||
Import-Module ActiveDirectory
|
||||
|
||||
#Import CSV
|
||||
$groups = Import-Csv c:\it\groups.csv
|
||||
|
||||
|
||||
# Loop through the CSV
|
||||
foreach ($group in $groups) {
|
||||
|
||||
$groupProps = @{
|
||||
|
||||
Name = $group.name
|
||||
Path = $group.path
|
||||
GroupScope = $group.scope
|
||||
GroupCategory = $group.category
|
||||
Description = $group.description
|
||||
|
||||
}#end groupProps
|
||||
|
||||
New-ADGroup @groupProps
|
||||
|
||||
} #end foreach loop
|
||||
Loading…
Add table
Add a link
Reference in a new issue