Cscript arsconfig.wsf [/?] /task:<'collect' | 'deploy' | 'rollback'> [/selection:"<filename.xml>"] [/package:"<filename.xml>"] [/map:"<filename.csv>"] [/verbose] [/log:"<filename>"] [/deletelog] [/server:<servername>] [/login:<username>] [/password:<userpassword>] [/danglingLinks:<'Stop' | 'Skip' | 'Deploy'>] [/ignoreLinks:<'0' | '1' | '2' | '3'>] [/ignoreErrors] [/upgrade]
This scenario explains how to use the ARSconfig command-line tool to transfer a set of configuration objects from a test Active Roles instance to a production instance.
Suppose you need to transfer the following configuration objects from a test Active Roles instance to a production Active Roles instance:
- The Configuration/Access Templates/Common container, including all child objects stored in this container.
- The Configuration/Managed Units/Development container, excluding the child objects stored in this container.
- All child objects stored in the Script Modules/Corporate Policy/Priority Access container, but excluding the container itself.
Also, assume that the names of the domains managed by the test (source) Active Roles instance are test1.company.com and test2.company.com, and the two corresponding domains managed by the production (target) Active Roles instance are prod1.company.com and prod2.company.com.
To implement this scenario, complete the following steps:
- Create a list of the configuration objects to collect
- Create configuration data package
- Add domain mapping
- Deploy the configuration data package
Step 1: Creating a list of the configuration objects to package
In this step, you create a list of the configuration objects that you want to collect into the configuration package, and define how you want to collect their child objects.
To do that, create the selection.xml file, and save that file to the solution installation folder: <Active Roles installation folder>\Configuration Transfer Wizard\Scripts.
To clarify the file format, consider the following sample file that illustrates how to collect Access Templates, Managed Units, and Script Modules residing within specified containers:
<?xml version="1.0" encoding="utf-8"?>
<Configuration>
<include DN="CN=Common,CN=Access Templates,CN=Configuration" collectSelf="True" collectChildren="True"/>
<include DN="CN=Development,CN=Managed Units,CN=Configuration" collectSelf="True" collectChildren="False"/>
<include DN="CN=Priority Access,CN=Corporate Policy,CN=Script Modules,CN=Configuration" collectSelf="False" collectChildren="True"/>
</Configuration>
Step 2: Creating configuration data package file
In this step, you use the ARSconfig command-line tool to create a configuration data package file using the data from the selection.xml file created in Step 1.
To create the configuration data package file
- At a command prompt, navigate to the Configuration Transfer Wizard installation folder, and enter the following syntax:
Cscript.exe arsconfig.wsf /task:collect /selection:selection.xml
As the result, the package.xml configuration data package file will be created in the following default location: <Active Roles installation folder>\Configuration Transfer Wizard\Scripts.
Step 3: Configuring domain mapping
If the names of the managed domains are different in the test and production environments, you must add domain mapping that defines the correspondence between the domain names. When the configuration package is deployed in the target environment, the domain names specified as a part of the objects' attributes are replaced with the names of the production domains, according to the name mapping entries.
In this step, you create the CSV domain name mapping file—mapping.csv, and then save that file to the solution installation folder: <Active Roles installation folder>\Configuration Transfer Wizard\Scripts. In this scenario, the mapping.csv file contains the following lines:
"DC=test1,DC=company,DC=com","DC=prod1,DC=company,DC=com"
"DC=test2,DC=company,DC=com","DC=prod2,DC=company,DC=com"
Step 4: Deploying the configuration data package
In this step, you use the ARSconfig command-line tool to deploy the package.xml configuration package in the production Active Roles environment. When running the arsconfig.wsf script, specify the package file to deploy (package.xml), and the domain name mapping file (mapping.csv) you have created in Step 3.
To deploy the package
- At a command prompt, navigate to the Configuration Transfer Wizard installation folder, and enter the following syntax:
Cscript.exe arsconfig.wsf /task:deploy /package:package.xml /map:mapping.csv
This step may be required if you have encountered any errors when deploying a configuration package in the production environment. By rolling back changes in the target configuration, you bring it to the state it was in before the package was deployed. Use the following instruction to roll back the changes made by the deployment of the package.xml file described in the scenario outlined above.
To roll back configuration changes
- At the command prompt, navigate to the Configuration Transfer Wizard installation folder, and enter the following syntax:
Cscript.exe arsconfig.wsf /task:rollback /package:package.xml