How To Automate Veeam Agent Deployment and Configuration

You can automate the process of Veeam Agent for Microsoft Windows deployment and configuration with scripts and GPO. This scenario describes how to install Veeam Agent in the unattended mode and configure the backup job and application settings with a command line script.

To deploy and configure Veeam Agent:

  1. Prepare a configuration file with the backup job and application settings. To facilitate creation of the configuration file, set up the necessary backup job and application settings on a machine protected with Veeam Agent, and export the configuration to a file with the Export command:

"C:\Program Files\Veeam\Endpoint Backup\Veeam.Agent.Configurator.exe" -export /f:C:\Veeam\configuration.xml

  1. For security purposes, Veeam Agent does not export password values. If you use credentials in the configuration, for example, to store backups on a backup repository that requires authentication, open the configuration file and provide passwords in place of "Enter the password here" placeholders.

Keep in mind that you must encrypt credentials that are provided in the configuration file. To learn more, see How User Credentials are Encrypted.

<TargetInfo Type="3" ServerName="srv06.tech.local" ServerPort="10001" RemoteRepositoryName="Default Backup Repository">
 <ServerCredentials UserName="c3J2MDZcQWRtaW5pc3RyYXRvcg==" Password="Enter the password here" />
</TargetInfo>

  1. Place the configuration file to a network shared folder accessible from the machine on which you plan to install and configure Veeam Agent. In this example, the configuration file is placed to the \\fileserver01\Veeam folder.
  2. Place the Veeam Agent setup file to a network shared folder accessible from the machine on which you plan to install and configure Veeam Agent. In this example, the setup file is placed to the \\fileserver01\Veeam folder.
  3. Run the unattended install command to install Veeam Agent on the machine. Veeam Agent uses the following codes to report about the installation results:
  • 1000 — Veeam Agent has been successfully installed.
  • 1001 — prerequisite components required for Veeam Agent have been installed on the machine. Veeam Agent has not been installed. The machine needs to be rebooted.
  • 1002 — Veeam Agent installation has failed.
  • 1004 — migration to SQLite database has failed.
  • 1101 — Veeam Agent has been installed. The machine needs to be rebooted.

You can use these codes to check if the product has been installed successfully or not. To do this, run the following command as a script:

  • For Veeam Agent for Microsoft Windows version 6.1:

\\fileserver01\Veeam\VeeamAgentWindows_6.1.0.349.exe /silent /accepteula /acceptthirdpartylicenses /acceptlicensingpolicy /acceptrequiredsoftware

echo %ERRORLEVEL%

  • For Veeam Agent for Microsoft Windows version 6.0:

\\fileserver01\Veeam\VeeamAgentWindows_6.0.2.1090.exe /silent /accepteula /acceptthirdpartylicenses

echo %ERRORLEVEL%

  1. If you want Veeam Agent to operate in the Workstation or Server edition, place a license file to a network shared folder accessible from the machine on which you plan to install and configure Veeam Agent. In this example, the license file is placed to the \\fileserver01\Veeam folder.
  2. Prepare a script that will install Veeam Agent in the unattended mode, import the backup job configuration and application settings on the target machine. The sample script below performs the following actions:
  1. Installs a license and sets the product edition to Workstation.
  2. Imports backup job configuration and application settings from the configuration file.

@echo --- Installing Product License and Setting Edition ---

"C:\Program Files\Veeam\Endpoint Backup\veeam.agent.configurator.exe" -license /f:"\\fileserver01\Veeam\veeam_agent_windows_license.lic" /w

@echo --- Importing Backup Job Configuration and Application Settings ---

"C:\Program Files\Veeam\Endpoint Backup\veeam.agent.configurator.exe" -import /f:"\\fileserver01\Veeam\configuration.xml"

If the script executes successfully, Veeam Agent Configurator will report error code 0 for each command in the script.