Solved

Replicate AD OU structure in pre-production lab

Posted on 2011-02-11
5
1,178 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Featured Post

Office 365 Training for IT Pros

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes my battle tested process for setting up delegation. I use this process anywhere that I need to setup delegation. In the article I will show how it applies to Active Directory
This article demonstrates probably the easiest way to configure domain-wide tier isolation within Active Directory. If you do not know tier isolation read https://technet.microsoft.com/en-us/windows-server-docs/security/securing-privileged-access/s…
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 from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

688 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