Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Replicate AD OU structure in pre-production lab

Posted on 2011-02-11
5
Medium Priority
?
1,205 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 2000 total points
ID: 35012072
0
 

Author Comment

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

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Microsoft Office 365 is a subscriptions based service which includes services like Exchange Online and Skype for business Online. These services integrate with Microsoft's online version of Active Directory called Azure Active Directory.
How to deal with a specific error when using the Enable-RemoteMailbox cmdlet to create a mailbox in the cloud-based service, for an existing user in an on-premises Active Directory.
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…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

824 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