Share via


Quenching a Thirst... Test Lab Hydration

Tenuous title link aside, here's a collection of scripts and steps that will help you hydrate a test lab. The scripts are designed to mirror an exiting environment.

 

Plant Your Forest

If you have the luxury of an Azure subscription take a look at the below forest build script. It will allow you to add member servers and clients, in addition to domain controllers. There's also a link to an Azure Automation Account Runbook to do the same in the Q & A section.

Build an Active Directory Forest in Microsoft Azure

 

If you don't have an Azure subscription then sign up for a free trial. Not an option? Have a look at this:

Create AD Forest with PowerShell

 

Right, once you have your forest it's time to populate it with 'stuff'.

Let it grow, let it grow,

Let it blossom, let it flow...

 

To Me, To OU

Now, let's create an OU structure. This will ensure our User and Group Policy imports are successful later on.

Here's a script to dump the OU structure from our existing domain:

Dump AD OU Structure Script

 

And, here's a script to mirror that structure to the new forest:

Mirror AD OU Structure Script

 

Vox Populi

Ah, the plebeian masses! Here's how to dump users:

Dump AD User Accounts Script

 

And, here's how to mirror those users to the test forest:

Mirror AD User Accounts Script

 

Group Policy

This script dumps policies, SoM, WMI filters and much, much more:

Comprehensive Group Policy Backup Script

 

Consider using the Migration Table option. Here's the sister import script:

Comprehensive Group Policy Import Script

 

And, that's it (for now). Groups and computers are on the to-do list. As is a module and / or a master hydration script.

Comments

  • Anonymous
    March 04, 2016
    Power
  • Anonymous
    November 01, 2016
    Hey Ian, thanks for the scripts, they are really awesome. Did you have one for computer accounts?