Example: Populating the Staging Domain from the XML Format File
Updated: March 28, 2003
Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1, Windows Server 2003 with SP2
Assume that your staging environment is the domain test.contoso.com, and is in the same forest as the production domain captured earlier in this chapter. Even if the staging domain is not in the same forest as the production domain, the steps for populating the staging domain are the same, but different mapping of security principals using migration tables might be required. To populate the staging domain, complete the following tasks:
Ensure that you are running the script CreateEnvironmentFromXML.wsf with sufficient permissions in the staging domain. You should run the script as a user as a member of Domain Admins or have equivalent access in the domain.
Ensure that you have access to the XML format file and backup GPOs that were created in the production domain by running CreateXMLFromEnvironment.wsf.
Note that when you run CreateEnvironmentFromXML.wsf, you are only referencing the XML format file (not the location of the backup GPOs) in the command-line options. That file includes the paths to the backup GPO files. Consequently, when you specify the XML file to CreateEnvironmentFromXML.wsf, the script uses any backup GPO files in the folder that was specified when the script CreateXMLFromEnvironment.wsf was run. If you ran CreateXMLFromEnvironment.wsf using the command as shown in "Example: Creating an XML Format File from a Production Environment" earlier in this chapter, then the XML file will indicate that the backups are in a sub-folder of the current folder. If you did not use a relative path when running CreateXMLFromEnvironment.wsf, there are three ways to ensure that CreateEnvironmentFromXML.wsf, can find the required files:
Copy the specified folder structure from the location where it was created to an identical path on the local computer from which you run CreateEnvironmentFromXML.wsf.
Specify a network share rather than a local drive when you first create the XML format file (the share must be also accessible from the location where you run CreateEnvironmentFromXML.wsf).
Edit the XML format file to change the path entries to point to a different location for the backup GPO files.
- Copy the specified folder structure from the location where it was created to an identical path on the local computer from which you run CreateEnvironmentFromXML.wsf.
Run CreateEnvironmentFromXML.wsf from the Scripts folder in the GPMC installation folder. You must precede the script name with the command
cscriptif cscript.exe is not your default WSH engine. For this example, type the following from the command line:
Cscript CreateEnvironmentFromXml.wsf /xml:c:\staging\production.xml /Domain:test.contoso.com /DC:test-dc1