> For the complete documentation index, see [llms.txt](https://docs.inogic.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.inogic.com/attach2dynamics/windows-tool/windows-task-scheduler/command-line-arguments-configuration.md).

# Command-Line Arguments Configuration

Command-line arguments specify the Data Migration operation, Dataverse environment, connector, migration type, action, date range, and Entity Configuration to be processed.

**Prerequisites**

Before configuring the command-line arguments, ensure that you have:

* Dataverse environment URL.
* Azure application Client ID and Client Secret. Refer to Section 3.
* Connector ID.

<figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0QoyqUVI8_HaZ9FOSL%2Fuploads%2FRVtM3SFaaYLlJq2FguGz%2Fimage.png?alt=media&amp;token=d8827100-8081-4dfc-844e-4cdae8dff4b2" alt=""><figcaption></figcaption></figure>

* Entity Configuration ID.

<figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0QoyqUVI8_HaZ9FOSL%2Fuploads%2FjWFatcvQJjv04bOPww75%2Fimage.png?alt=media&amp;token=9369670a-b332-4778-98d6-8d6856bbcbf1" alt=""><figcaption></figcaption></figure>

* Required migration start and end dates.
* Application User configured in the target environment with the required permissions.
* Valid Attach2Dynamics license.
* Access to the configured destination.

**Important:** The Connector ID and Entity Configuration ID must belong to the same Dataverse environment specified in --crmUrl.

**Common Command-Line Arguments**

| **Argument**    | **Description**                                                                        |
| --------------- | -------------------------------------------------------------------------------------- |
| --scheduler     | Starts the application in scheduler mode.                                              |
| --operation     | Specifies the operation to execute. Use DataMigration.                                 |
| --migrationType | Specifies the migration type: Notes, Activities, SalesLiterature, or EmailBodyContent. |
| --action        | Specifies the action for supported migration types: Copy or Move.                      |
| --startDate     | Specifies the migration start date.                                                    |
| --endDate       | Specifies the migration end date.                                                      |
| --entityConfig  | Specifies the Entity Configuration ID.                                                 |
| --crmUrl        | Specifies the Dataverse environment URL.                                               |
| --clientId      | Specifies the Azure application Client ID.                                             |
| --clientSecret  | Specifies the Azure application Client Secret.                                         |
| --connectorId   | Specifies the configured Connector ID.                                                 |

**Command Formatting Guidelines**

* Use the date format yyyy-MM-dd, for example, 2026-10-07.
* Use valid Connector and Entity Configuration IDs from the target environment.
* Use one Entity Configuration ID and one Connector ID per Data Migration execution.
* Ensure that the migration type matches the selected Entity Configuration.
* For Notes, Activities, and SalesLiterature, specify the action as Copy or Move.
* For EmailBodyContent, omit the --action argument.
* Enter the complete command on one line in Task Scheduler's Add arguments field.

**Data Migration Command Examples**

Replace the sample Dataverse URL, credentials, Connector ID, and Entity Configuration ID with the correct values from your environment.

**Notes Migration – Copy**

```
--scheduler --operation "DataMigration" --migrationType "Notes" --action "Copy" --startDate "2026-10-07" --endDate "2026-10-07" --entityConfig "<ENTITY_CONFIGURATION_ID>" --crmUrl "
https://yourorg.crm.dynamics.com/"
 --clientId "<CLIENT_ID>" --clientSecret "<CLIENT_SECRET>" --connectorId "<CONNECTOR_ID>"
```

**Notes Migration – Move**

```
--scheduler --operation "DataMigration" --migrationType "Notes" --action "Move" --startDate "2026-10-07" --endDate "2026-10-07" --entityConfig "<ENTITY_CONFIGURATION_ID>" --crmUrl "
https://yourorg.crm.dynamics.com/"
 --clientId "<CLIENT_ID>" --clientSecret "<CLIENT_SECRET>" --connectorId "<CONNECTOR_ID>"
```

**Activities Migration – Copy**

```
--scheduler --operation "DataMigration" --migrationType "Activities" --action "Copy" --startDate "2026-10-08" --endDate "2026-10-08" --entityConfig "<ENTITY_CONFIGURATION_ID>" --crmUrl "
https://yourorg.crm.dynamics.com/"
 --clientId "<CLIENT_ID>" --clientSecret "<CLIENT_SECRET>" --connectorId "<CONNECTOR_ID>"
```

**Activities Migration – Move**

```
--scheduler --operation "DataMigration" --migrationType "Activities" --action "Move" --startDate "2026-10-08" --endDate "2026-10-08" --entityConfig "<ENTITY_CONFIGURATION_ID>" --crmUrl "
https://yourorg.crm.dynamics.com/"
 --clientId "<CLIENT_ID>" --clientSecret "<CLIENT_SECRET>" --connectorId "<CONNECTOR_ID>"
```

**SalesLiterature Migration – Copy**

```
--scheduler --operation "DataMigration" --migrationType "SalesLiterature" --action "Copy" --startDate "2026-10-08" --endDate "2026-10-08" --entityConfig "<ENTITY_CONFIGURATION_ID>" --crmUrl "
https://yourorg.crm.dynamics.com/"
 --clientId "<CLIENT_ID>" --clientSecret "<CLIENT_SECRET>" --connectorId "<CONNECTOR_ID>"
```

**SalesLiterature Migration – Move**

```
--scheduler --operation "DataMigration" --migrationType "SalesLiterature" --action "Move" --startDate "2026-10-08" --endDate "2026-10-08" --entityConfig "<ENTITY_CONFIGURATION_ID>" --crmUrl "
https://yourorg.crm.dynamics.com/"
 --clientId "<CLIENT_ID>" --clientSecret "<CLIENT_SECRET>" --connectorId "<CONNECTOR_ID>"
```

**EmailBodyContent Migration**

For EmailBodyContent migration, use the following command. The --action argument is not required.

```
--scheduler --operation "DataMigration" --migrationType "EmailBodyContent" --startDate "2026-10-08" --endDate "2026-10-08" --entityConfig "<ENTITY_CONFIGURATION_ID>" --crmUrl "
https://yourorg.crm.dynamics.com/"
 --clientId "<CLIENT_ID>" --clientSecret "<CLIENT_SECRET>" --connectorId "<CONNECTOR_ID>"
```

{% hint style="info" %}
Note: For EmailBodyContent migration, the `--action` argument (Copy/Move) is not required. Omit this argument from the command-line syntax.
{% endhint %}

**Recommendation:** For Notes, Activities, and SalesLiterature, test the migration using Copy first and verify the destination content before running a Move operation.
