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:
- 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 |
- 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"> |
- 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.
- 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.
- 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:
\\fileserver01\Veeam\VeeamAgentWindows_6.3.0.177.exe /silent /accepteula /acceptthirdpartylicenses /acceptlicensingpolicy /acceptrequiredsoftware echo %ERRORLEVEL% |
- 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.
- 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:
- Installs a license and sets the product edition to Workstation.
- Imports backup job configuration and application settings from the configuration file.
@echo --- Installing Product License and Setting Edition --- |
If the script executes successfully, Veeam Agent Configurator will report error code 0 for each command in the script.