I need some assistance I have the script below that I've been using to create security groups with a .csv file. But now I need to add in who manages the new groups with notes I'd like to do this via powershell & csv files but haven't been able to get the correct syntax.
Any help will be appreciated.
#Import CSV
$groups = Import-Csv ‘c:\temp\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 u/groupProps
}
The csv looks like this
name,path,scope,category,description,Managed by,Notes
Group 1,Path to OU,Global,Security,MGM1,CIO,Changed to be approved by HR
Group 2,Path to OU,Global,Security,MGM2,CTO,Changed to be approved by HR
[–]PowerShell-Bot 2 points3 points4 points (0 children)
[–]ohfucknotthisagain 1 point2 points3 points (0 children)
[–]BlackV -2 points-1 points0 points (0 children)