As an alternative to using the graphical user interface tools, you can use the ARSconfig command-line tool. The ARSconfig tool is the arsconfig.wsf Windows Script File (WSF) that defines the command line parameters and the required object references.
Using the ARSconfig tool requires two files to be pre-configured, before running the script. These are a file that lists the configuration objects that the package must include, and, if necessary, a file containing domain mapping entries.
To run the ARSconfig command-line tool
-
Open the Windows Command Prompt.
-
From the command prompt, run the arsconfig.wsf script, specifying the required type of task and parameters. The script syntax is described in ARSconfig syntax.
The ARSconfig Windows Script File has the following syntax.
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]
The ARSconfig Windows Script File (WSF) has the following parameters.
Table 59: Parameters
task |
This is a required parameter which defines the type of task you want to perform by using this script.
Specify one of these parameter values:
-
'collect' - Collects configuration data from the source Active Roles environment, and creates a configuration package file.
-
'deploy' - Populates the target Active Roles instance with objects from a configuration package created earlier by Configuration Transfer Wizard.
-
'rollback' - Reverts the configuration of the target Active Roles instance to the state it was in before deployment of the configuration package. |
selection |
The path and name of the XML file containing a list of the source configuration objects to be included in the configuration package.
This parameter is required when you use this script to create a configuration package. The XML file you specify in this parameter must be manually created before you run the script. |
package |
The full path to the configuration package XML file.
Add this parameter is you want to specify a custom name and location for the configuration package file. If you do not specify this parameter, the script assumes that the installation path, and the default package file name are used. |
map |
The name of the domain mapping file.
Add this parameter if you want the test domain names to be replaced with the production domain names, during configuration package deployment.
You can add this parameter only when you use this script to deploy a configuration package. The CSV file you specify in this parameter must be manually created before you run the script. |
verbose |
Enables log trace output.
If this parameter is not specified, then no information is displayed in the Command Prompt while the script is running. |
log |
Specifies the name of the trace output file. You can also specify a target location for the log file.
Add this parameter to create a log file with diagnostic information. |
deletelog |
Deletes the trace output file upon successful completion.
Add this parameter if you want the log file deleted if a task was completed with no errors. |
server |
The fully qualified domain name of the computer running the Administration Service to connect to.
If this parameter is not specified, the script attempts a connection to any available Administration Service. |
login |
The user logon name of the account with which you want to connect, in the form Domain\UserName, or in the form of a user principal name. |
password |
Password for the user logon name you specify in the login parameter. |
danglingLinks |
This parameter takes effect if the task parameter value is set to 'deploy', and specifies whether to deploy Access Template or Policy Object links, if any found in the package, that refer to objects which may fail to be resolved in the destination environment (dangling links). The acceptable parameter values are:
-
'Stop' - The deployment process is not started if any dangling links are detected (default setting)
-
'Skip' - The dangling links are not deployed in the destination environment
-
'Deploy' - Deployment of the dangling links is attempted based on the data found in the package |
ignoreLinks |
Specifies whether to collect Access Template links and Policy Object links. This parameter can take any of the following values:
-
'0' - Collect all links (default setting).
-
'1' - Do not collect Policy Object links.
-
'2' - Do not collect Access Template links.
-
'3' - Do not collect Policy Object and Access Template links. |
ignoreErrors |
If this parameter is specified, the solution ignores any errors that can be encountered during the configuration deployment. |
upgrade |
If supplied together with /task:'deploy', preserves the existing links, policy parameters and scheduled task parameters. Without this parameter, the deployment of a configuration package replaces the existing links with the links found in the configuration package, and resets the policy and schedule task parameters to the default values. |
This example 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
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>
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
-
Open the Windows Command Prompt.
-
In the 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\Configuration Transfer Wizard\Scripts
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), then save that file to the installation folder of the Configuration Transfer Wizard:
\Active Roles\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"
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 the previous step.
To deploy the configuration data package
-
Open the Windows 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