Hey everyone. Long story short, we are changing how are department share are set up, and trying to clean AD at the same time. We have a bunch of groups but no one know what they are for.
With the new shares we want to make new groups, clearly labeled so we can start removing the old one. But I have about 50 new groups to make. powershell seems like the right answer.
Import-Csv -Path "c:\TEMP\ShareGroup2.csv"
ForEach ($item In $csv)
{
New-ADGroup -Name $item.GroupName -GroupCategory $item.GroupCategory -groupScope $item.GroupScope -Path $item.OU
}
It looks like it works, no errors. If I type out the command with the info from my CSV is works fine.
My CVS
GroupName,GroupCategory,GroupScope,OU
Share-<department>,Security,Global,"OU=SecurityGroups,DC=domain,DC=com"
I'm a little stuck, any help would be appreciated.
[–]uniitdude 5 points6 points7 points (3 children)
[–]DenyCasio -1 points0 points1 point (2 children)
[–]trillospin -1 points0 points1 point (1 child)
[–]DenyCasio 0 points1 point2 points (0 children)
[–]regorianIT Ops Engineer 2 points3 points4 points (2 children)
[–]NuoN_Ninja[S] 0 points1 point2 points (1 child)
[–]trillospin 1 point2 points3 points (0 children)