Script to import reg files with specific ou

Hi Experts,

We need help creating a script file that will import 6 reg files through GPO and exclude on GPO. Any help much appreciated. Thanks.
jaya31Asked:
Who is Participating?
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.

Matt MinorTechnical Systems AnalystCommented:
You can accomplish this by creating a batch file as follows:

regedit /s \\server\folder\item.reg

Place the reg items to be imported in an accessible location, and then create a startup-script GPO targeted to the desired OU.

Is that kind of what you are getting at?
jaya31Author Commented:
Hi Matt,

Thanks.  Manager wants one script that will import to all OU's except one
Matt MinorTechnical Systems AnalystCommented:
You could create a security group for all of the computer objects under that OU and add each computer as a member. In your group policy filtering, add that group with Deny read/apply so the inherited Gpo would be filtered out on all of those machines.

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
Announcing the Winners!

The results are in for the 15th Annual Expert Awards! Congratulations to the winners, and thank you to everyone who participated in the nominations. We are so grateful for the valuable contributions experts make on a daily basis. Click to read more about this year’s recipients!

jaya31Author Commented:
That could work,  just a tedious adding each computer
Matt MinorTechnical Systems AnalystCommented:
You could add them all in bulk
jaya31Author Commented:
Hi Matt,

Apologies for the delay, I was away, going to test and update you
jaya31Author Commented:
Matt,

I tested but I'm not understanding. I created a security group with all the computers I need and omitted the ones I do. In GPO I go to startup to add the cmd, but I don't see anywhere to choose the security group.
jaya31Author Commented:
Thanks again, sorry for the delay. We ended up using the bat script and the add registry files built in to the GPO. Also, we used Matt's suggestion to create a security group and deny the machines and users we didn't want to the script to run on. Thanks.
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
VB Script

From novice to tech pro — start learning today.