Link to home
Start Free TrialLog in
Avatar of jaya31
jaya31Flag 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.
Avatar of Matt Minor
Matt Minor
Flag of Canada image

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

ASKER

Hi Matt,

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

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jaya31

ASKER

That could work,  just a tedious adding each computer
You could add them all in bulk
Avatar of jaya31

ASKER

Hi Matt,

Apologies for the delay, I was away, going to test and update you
Avatar of 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.
Avatar of 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.