Standalone backup agent for Microsoft Windows servers and workstations (formerly Veeam Endpoint Backup FREE)
Post Reply
frankive
Service Provider
Posts: 1092
Liked: 134 times
Joined: May 14, 2013 8:35 pm
Full Name: Frank Iversen
Location: Norway
Contact:

Veeam agent - get job name

Post by frankive »

We have some RMM tools where we check certain customers for their backupstatus through a powershellscript.
The script works greay but need the job name as the variable.
Is there a command we can run to get the job name and save it to a variable in the script?

Does Veeam Agent locally installed on a computer have powershell?
Have been trying to run Get-Module -Name Veeam.Backup.PowerShell and get-vbrjob but I think that only is for V11 server
Dima P.
Product Manager
Posts: 14417
Liked: 1576 times
Joined: Feb 04, 2013 2:07 pm
Full Name: Dmitry Popov
Location: Prague
Contact:

Re: Veeam agent - get job name

Post by Dima P. »

Hi Frank,
Is there a command we can run to get the job name and save it to a variable in the script?
The job name is available in job summary or via configuration xml. You can export the configured job and get the name from xml file.
Does Veeam Agent locally installed on a computer have powershell?
Agents do not support PowerShell, only command line integrations but agent must be licensed to enable the command line interface.
frankive
Service Provider
Posts: 1092
Liked: 134 times
Joined: May 14, 2013 8:35 pm
Full Name: Frank Iversen
Location: Norway
Contact:

Re: Veeam agent - get job name

Post by frankive » 1 person likes this post

Excellent! This solved my problem.
For others users; here is how I got the JobName into a variable:

Code: Select all

# Export XML file with Configuration settings from Veeam Agent
$eksporter = "C:\Program Files\Veeam\Endpoint Backup\Veeam.Agent.Configurator.exe"
& $eksporter -export
 
# Get the Job Name from the exported file
[xml]$XmlDocument = Get-Content C:\programdata\Veeam\Endpoint\!Configuration\Config.xml 
$nodes = $XmlDocument.SelectNodes('//Data//JobInfo')
$ArgBackupJobName = $nodes.GetAttribute("JobName")
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 21 guests