Solved

Replicate AD OU structure in pre-production lab

Posted on 2011-02-11
5
1,141 Views
Last Modified: 2012-05-11
Hi All,

I need to set up a DC in our Pre-prodcution lab that replicate the same OU structures in our production AD.  and export all group policies from production DC to the PP DC.

I dont need user accounts or computer accounts replicated over. So just OUs and group policy.

We are running on 2008R2.

What would be the best way of doing this.

please advise.

Thanks
0
Comment
Question by:fireburn11
  • 2
  • 2
5 Comments
 
LVL 11

Expert Comment

by:Tasmant
ID: 34878421
For the OU hierarchy, you can use LDIFDE (or CSVDE)
You can find reals examples here (in the zip attached) : http://www.computerperformance.co.uk/Logon/Logon_LDIFDE_example.htm
If your target domain has the same name as your production domain, you don't need to use the -c swith in the script.
Maybe you will need to add some attributes for the export, because i think you want to preserve group policy links on your OUs, therefore you will need to add attributes like gpLink and gpOptions.
But i don't know if the GUID associated in this attribute will be the same when you'ill import all GPOs objects.

For Group Policy, you can use GPMC to backup all your GPOs objects.
You can then import them in the new domain. Maybe you will need a migration table (it's a file to translate security accounts by example). I hope GUID will be preserved, else all GPOs linked will be break.
0
 
LVL 35

Expert Comment

by:Joseph Daly
ID: 34879367
Ok so im pretty sure this will work for you as far as creating the OU structure. This will use the DS series of tools. It will be a two step process first you will need to dump your production OUs to a text file and then if necessary change distinguished names if the domain name is different. This can be done pretty easily in excel.

So to dump all the ous for your domain you can use the following command on a computer that has the adminpak installed.

dsquery ou -limit 0 > c:\file.txt

This will dump the distinguished name of your ous like below.
"OU=Blah,DC=company,DC=com"

If necessary you can import this file into excel and then use find/replace to modify the DC=company,DC=com if it is different in your test environment.

Once you have that done you will use DSadd in your test environment to create the OUs again.

dsadd ou "OU=Blah,DC=testenvironment,DC=com"


You have two ways of doing this. You can either create a script to loop the text file or the way I do it is just use excel to autofill the dsadd ou part then copy all of the entries to a batch file and run it.

I hope this makes sense below are links to the DSquery and DSadd commands
http://tmdnet.nothave.com/book/OS/MANUALS/COMMANDS/D/DSQUERY.HTM
http://tmdnet.nothave.com/book/OS/MANUALS/COMMANDS/D/DSADD.HTM

If you have any questions let me know and i will do my best to assist.
0
 

Author Comment

by:fireburn11
ID: 34993670
Hi Tasment,

I was able to import the OU stroucturs and groups, now I really need to import the GPOs into the test envirnment.
can you be more specific about "For Group Policy, you can use GPMC to backup all your GPOs objects.
You can then import them in the new domain. Maybe you will need a migration table (it's a file to translate security accounts by example). I hope GUID will be preserved, else all GPOs linked will be break. "

Thanks alot!
0
 
LVL 11

Accepted Solution

by:
Tasmant earned 500 total points
ID: 35012072
0
 

Author Comment

by:fireburn11
ID: 35085790
migration table is the key, Thanks
0

Join & Write a Comment

I'm sure that every Windows systems administrator has written, or at least used, a batch or VBS login script at some point in their career, whether it is to map network drives, install printers, or set some user preferences.  No more! With Window…
As network administrators; we know how hard it is to track user’s login/logout using security event log (BTW it is harder now in windows 2008 because user name is always “N/A” in the grid), and most of us either get 3rd party tools, or just make our…
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now