Avatar of jaya31
jaya31
Flag for United States of America asked on

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.
VB ScriptScripting Languages

Avatar of undefined
Last Comment
jaya31

8/22/2022 - Mon
Matt Minor

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?
jaya31

ASKER
Hi Matt,

Thanks.  Manager wants one script that will import to all OU's except one
ASKER CERTIFIED SOLUTION
Matt Minor

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
jaya31

ASKER
That could work,  just a tedious adding each computer
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
Matt Minor

You could add them all in bulk
jaya31

ASKER
Hi Matt,

Apologies for the delay, I was away, going to test and update you
jaya31

ASKER
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.
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
jaya31

ASKER
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.