Script to import reg files with specific ou

jaya31
jaya31 used Ask the Experts™
on
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.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Matt MinorTechnical Systems Analyst

Commented:
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?

Author

Commented:
Hi Matt,

Thanks.  Manager wants one script that will import to all OU's except one
Technical Systems Analyst
Commented:
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.
Become a CompTIA Certified Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

Author

Commented:
That could work,  just a tedious adding each computer
Matt MinorTechnical Systems Analyst

Commented:
You could add them all in bulk

Author

Commented:
Hi Matt,

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

Author

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.

Author

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.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial