Security Groups with Powershell & CSV

Hi Guys,

Wondering if someone could generate some good Powershell to try and achieve the following.

I've just inherited a messy AD and need to organise it. There's just one OU full of security groups with no indication of what they actually do.

I'm trying to recreate the groups with a bit more structure E.g. SYSadmin role on a SQLServer1 the security group would be SQL - SysAdmin on SQLSERVER1

What I need is a spreadsheet where I can specify the legacy security group in one column and the new security group whereby all the members of the legacy security group need to be copied into, in the next column. I also need it to create the security group if it doesn't already exist and the newly created security groups need to go into one specific OU and I'll sort them once done.

Can anyone generate a good powershell script for this?

Cheers!

Jack
LVL 1
Jack LloydTechnical Services AnalystAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Josh PriceApplication EngineerCommented:
I think I can help. Do you need the script to do the work based on what you've put into your spreadsheet? Or do you need to gather the groups and members too?

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Powershell

From novice to tech pro — start learning today.