Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support Veeam Endpoint backup jobs to Windows agent plugin. #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 24 additions & 1 deletion agents/windows/plugins/veeam_backup_status.ps1_
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ foreach ($myJob in $myBackupJobs)

# For Non Backup Jobs (Replicas) we bail out
# because we are interested in the status of the original backup but
# for replicas the overall job state is all we need.
# for replicas the overall job state is all we need.
if ($myJob.IsBackup -eq $false) { continue }

# Each backup job has a number of tasks which were executed (VMs which were processed)
Expand Down Expand Up @@ -143,6 +143,29 @@ foreach ($myJob in $myBackupJobs)
# END OF LOOP foreach ($myJob in $myBackupJobs)
}


# Get Endpoint backup jobs.
$myVBREPBackupJobs = Get-VBREPJob

# Iterate through all backup jobs
foreach ($myJob in $myVBREPBackupJobs)
{
$myJobName = ""
$myJobName = $myJob.Name -replace "\'","_" -replace " ","_"

$myJobType = ""
$myJobType = $myjob.Type

$myJobLastState = ""
$myJobLastState = $myJob.LastState

$myJobLastResult = ""
$myJobLastResult = $myJob.LastResult

$myJobsText = "$myJobsText" + "$myJobName" + "`t" + "$myJobType" + "`t" + "$myJobLastState" + "`t" + "$myJobLastResult" + "`n"
}


# Final output
write-host $myJobsText
write-host $myTaskText
Expand Down