Skip to content

Options

OptionValueCommandsMeaning
-p, --projectfile, JSON, or -allRequired. The project file saved by the XrmToolBox tool (.replisteer.json or .replisteer.xml), the JSON / XML content itself, or - to read it from standard input.
-s, --sourceconnection stringallConnection string of the source.
-t, --target<name>=<connection string>allConnection string of a target, by target name or id. Repeat it for every target. When the project has one target, the name can be left out.
-c, --connectionsfileallJSON file with connection strings by connection name. See Connections file.
-r, --rowsnumberrun, previewpreview: number of rows (default 20). run: process at most this many rows.
-o, --outputfileallAlso save the result to a file: .json, .csv, .txt or .log. See Result files.
-q, --quietallPrint only problems and the final summary.
-h, --help, /?Show the help.

Options are written as --option value; long names also as --option=value. Option and command names are case-insensitive.

Quoting values

Values with spaces, ;, &, |, < or > must be in double quotes. Connection strings always contain ;, so always quote them:

replisteer run --project "C:\My Projects\accounts.replisteer.json" --target "CRM=AuthType=ClientSecret;Url=https://contoso.crm4.dynamics.com;ClientId=...;ClientSecret=..."

In PowerShell, double-quoted strings expand $ and backticks: use single quotes for connection strings that contain them ('...;Password=pa$$word'), or a connections file.

In batch files, % starts a variable: write %% for a literal %.

Pasting a project

--project also accepts the project’s JSON or XML content, which is convenient in pipelines that generate projects. Reading it from standard input avoids quoting problems:

cat accounts.replisteer.json | replisteer run --project - --connections connections.json

Target names

--target and the connections file find targets by:

  1. their id (--target "2=..."), as shown on the Targets tab;
  2. their name, ignoring case (--target "crm prod=..." matches CRM Prod);
  3. their name with every character other than letters and digits written as _ (--target "CRM_Prod=..."), like the environment variables.

An unknown name is an error that lists the targets of the project.

Built-in help

This is the output of replisteer help:

Replisteer runs projects saved by the Replisteer XrmToolBox tool, without XrmToolBox.

Usage:
  replisteer run      --project <file> [connections] [--rows <n>] [--output <file>] [--quiet]
  replisteer preview  --project <file> [connections] [--rows <n>] [--output <file>]
  replisteer validate --project <file> [connections] [--output <file>]
  replisteer help | version

Commands:
  run        Reads the source and writes every row to the targets.
  preview    Dry run of the first rows (--rows, default 20): shows what would be written, writes nothing.
  validate   Checks the project, opens every connection and checks tables and columns; writes nothing.

Options:
  -p, --project <file>       Project file (.replisteer.json or .replisteer.xml), its JSON / XML content,
                             or - to read it from standard input.
  -s, --source <connection>  Connection string of the source.
  -t, --target <name>=<connection>
                             Connection string of a target, by target name or id; repeat for every target.
                             The name can be left out when the project has one target.
  -c, --connections <file>   JSON file with connection strings by connection name, e.g.
                             { "Source": "...", "CRM": "AuthType=ClientSecret;..." }
                             Keeps secrets out of the command line and the task scheduler.
  -r, --rows <n>             preview: number of rows (default 20). run: process at most n rows.
  -o, --output <file>        Also saves the result: .json (summary, steps, failed rows, preview),
                             .csv (failed rows; preview records for preview; problems for validate),
                             .txt or .log (the log).
  -q, --quiet                Prints only problems and the summary.

Connection strings:
  Dataverse   AuthType=ClientSecret;Url=https://contoso.crm4.dynamics.com;ClientId=<app id>;ClientSecret=<secret>
              (other authentication types: https://learn.microsoft.com/power-apps/developer/data-platform/xrm-tooling/use-connection-strings-xrm-tooling-connect)
  SQL Server  Server=sql.contoso.com;Database=dw;User ID=replisteer;Password=<password>;Encrypt=true
              Passwords saved by the XrmToolBox tool are used when the runner runs as the same Windows user.
  CSV file    The file path; without it the path saved in the project is used.
  Order: --source / --target, then --connections, then environment variables
  (Connection__<name>__ConnectionString), then the project file.

Exit codes:
  0  succeeded (validate: no errors)
  1  the run failed or was cancelled
  2  the run completed, but some rows failed
  3  invalid command line, project or connections; nothing was written
Last updated on