Export (0) Print
Expand All

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:

  1. 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.

  2. 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.

  3. Run CreateEnvironmentFromXML.wsf from the Scripts folder in the GPMC installation folder. You must precede the script name with the command cscript if 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
    
    The script generates a warning that the script is intended for creating staging environments only, and then prompts you to enter a password for user objects. If you use the /Q option and supply the password using the PasswordForUsers option when you run this script, these messages are not presented. If you confirm that you want to proceed, the script provides status as it processes the XML file and GPOs. You can then confirm that all steps completed correctly by using the Active Directory Users and Computers MMC snap-in and GPMC to verify that users, groups, and GPOs were successfully created.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft