Skip to main content

Sync Datto RMM Sites [VSA 9 Migration]

Summary​

Prepares VSA 9 for the move to Datto RMM. The agent procedure:

  • Creates a Datto RMM site for every VSA 9 machine group that does not have one yet.
  • Stores the Datto RMM site UID of each agent in cPVALDattoRmmSiteUid.
  • Stores the Datto RMM agent download address in cPVALDattoRmmAgentUrl.
  • Creates the three custom fields of the solution in VSA 9 when they are missing.

The Install Datto RMM Agent [VSA 9 Migration] agent procedure then uses these fields to install the agent into the correct site.

warning

Run this agent procedure once, against a single Windows machine. It works on the whole VSA 9 tenant and Datto RMM account through their APIs, so running it on more machines only repeats the same work. Do not schedule it against all machines.

Dependencies​

Implementation​

  1. Export the agent procedure from ProVal's VSA RMM instance.
    Name: Sync Datto RMM Sites [VSA 9 Migration]

    The export will download the necessary XML file.

  2. Import this XML file into the partner's VSA RMM instance.

  3. Export the Sync-DattoRmmSite.ps1 from ProVal's Internal VSA. This is also placed under the below path:
    Manage Files > Shared Files > PVAL > Sync-DattoRmmSite.ps1
    Image1

  4. Map the Sync-DattoRmmSite.ps1 into the procedure's writeFile step (Step 30) in the client's environment.
    Image2

Sample Run​

Image3

Variables​

VariableTypeDefaultDescription
VsaUrlString(required)Web address used to sign in to VSA 9, for example https://example.kaseya.net.
VsaUsernameString(required)VSA 9 user that owns the personal access token. Letter case matters.
VsaPersonalAccessTokenString(required)VSA 9 personal access token with the REST API (Read, Write) scope.
DattoRmmApiUrlString(required)Datto RMM API URL from your user record, for example https://merlot-api.centrastage.net.
DattoRmmApiKeyString(required)Datto RMM API key.
DattoRmmApiSecretKeyString(required)Datto RMM API secret key.
CreateEmptyGroupSiteStringFalseAlso creates sites for machine groups that have no agents. Accepted values: 1, Yes, True
ResultCsvPathStringC:\ProgramData\_Automation\Script\Sync-DattoRmmSite\Sync-DattoRmmSite.csvFull path of the result CSV.
note

Avoid apostrophes (single quotes) in variable values. An apostrophe breaks the command that saves the values on the device.

note

The values are saved to a temporary file on the device for the run only. The procedure deletes the file as soon as the script finishes, because it holds the credentials.

Site Naming​

VSA 9 setupDatto RMM site nameExample
Organization with only its root machine groupOrganization nameContoso
Any other machine groupOrganization name - group nameContoso - branch

The group name is the part of the machine group name after the first dot. A Datto RMM site that already has the name is reused, ignoring letter case.

Results by Agent​

The result CSV has one row per VSA 9 agent.

ResultMeaning
UpdatedThe site UID and download address were saved on the agent.
NoDattoRmmSiteNo Datto RMM site exists for the agent, usually because creating its site failed. Fix the cause and run again.
FailedVSA 9 rejected the update. The Detail column shows the reason.
note

The procedure reports a failure when any site could not be created or any agent could not be updated. Running it again is safe: existing sites are reused and the custom fields are overwritten. Run it again whenever agents or machine groups are added to VSA 9.

warning

Enter the Datto RMM API URL exactly as shown on your Datto RMM user record. When it does not have the form https://servername-api.centrastage.net, the download address is not saved and the agent install fails.

Output​

  • Agent Procedure Log
  • New sites in Datto RMM
  • Custom fields on each VSA 9 agent
  • Result CSV on the device:
    • C:\ProgramData\_Automation\Script\Sync-DattoRmmSite\Sync-DattoRmmSite.csv

Changelog​

2026-10-16​

  • Initial version of the document.