Need to pull a report of protected servers along with job names for which the application aware processing is enabled
We have Veeam one / can use script option , backup version 13
Need to pull a report of protected servers along with job names for which the application aware processing is enabled
We have Veeam one / can use script option , backup version 13
Best answer by Chris.Childerhose
Try this code, as it will pull all jobs with AAP enabled.
# ============================================================
# Veeam 13 - Application-Aware Processing Report
# PowerShell 7 Compatible
# Lists all protected servers with AAP enabled per job
# ============================================================
# --- Load Veeam Module (PS7 compatible) ---------------------
$VeeamModulePath = "C:\Program Files\Veeam\Backup and Replication\Console"
if (-not (Get-Module -Name Veeam.Backup.PowerShell -ErrorAction SilentlyContinue)) {
if ($env:PSModulePath -notlike "*$VeeamModulePath*") {
$env:PSModulePath += [System.IO.Path]::PathSeparator + $VeeamModulePath
}
Import-Module Veeam.Backup.PowerShell -ErrorAction Stop
}
# Connect to the local Veeam server (change -Server if running remotely)
Connect-VBRServer -Server localhost -ErrorAction Stop
$report = @()
$dateStr = Get-Date -Format "yyyyMMdd_HHmm"
# ============================================================
# PART 1: VM Backup Jobs (VMware / Hyper-V)
# ============================================================
Write-Host "[INFO] Processing VM Backup Jobs..." -ForegroundColor Cyan
# -WarningAction SilentlyContinue suppresses the Backup Copy job warning
$vmJobs = Get-VBRJob -WarningAction SilentlyContinue |
Where-Object { $_.JobType -eq "Backup" }
foreach ($job in $vmJobs) {
try {
$vssOpts = Get-VBRJobVSSOptions -Job $job
if ($vssOpts.Enabled) {
$jobObjects = Get-VBRJobObject -Job $job |
Where-Object { $_.Type -eq "Include" }
foreach ($obj in $jobObjects) {
# Check for per-VM AAP override
$aapStatus = "Enabled"
try {
$objVss = Get-VBRJobObjectVssOptions -Object $obj -ErrorAction SilentlyContinue
if ($null -ne $objVss -and $objVss.Enabled -eq $false) {
$aapStatus = "Disabled (VM-Level Override)"
}
} catch {
$aapStatus = "Enabled (override check skipped)"
}
$report += [PSCustomObject]@{
"Job Name" = $job.Name
"Server / VM" = $obj.Name
"Object Type" = $obj.TypeDisplayName
"Job Type" = "VM Backup"
"AAP Status" = $aapStatus
"VSS Strategy" = if ($vssOpts.IgnoreErrors) { "Ignore Errors" } else { "Require Success" }
}
}
}
} catch {
Write-Warning "Could not process VM job: $($job.Name) - $_"
}
}
# ============================================================
# PART 2: Veeam Agent Backup Jobs (Physical / Computer)
# ============================================================
Write-Host "[INFO] Processing Agent Backup Jobs..." -ForegroundColor Cyan
try {
$agentJobs = Get-VBRComputerBackupJob -ErrorAction SilentlyContinue
foreach ($agentJob in $agentJobs) {
try {
$appOpts = $agentJob.GuestProcessingOptions
if ($null -ne $appOpts -and $appOpts.AppAwareProcessingEnabled) {
$computers = Get-VBRJobObject -Job $agentJob -ErrorAction SilentlyContinue
if ($null -ne $computers -and $computers.Count -gt 0) {
foreach ($comp in $computers) {
$report += [PSCustomObject]@{
"Job Name" = $agentJob.Name
"Server / VM" = $comp.Name
"Object Type" = "Computer"
"Job Type" = "Agent Backup"
"AAP Status" = "Enabled"
"VSS Strategy" = if ($appOpts.IgnoreErrors) { "Ignore Errors" } else { "Require Success" }
}
}
} else {
# Protection group-based job — individual computers not resolvable here
$report += [PSCustomObject]@{
"Job Name" = $agentJob.Name
"Server / VM" = "(Protection Group - enumerate via Get-VBRDiscoveredComputer)"
"Object Type" = "Protection Group"
"Job Type" = "Agent Backup"
"AAP Status" = "Enabled"
"VSS Strategy" = "N/A"
}
}
}
} catch {
Write-Warning "Could not process agent job: $($agentJob.Name) - $_"
}
}
} catch {
Write-Warning "Get-VBRComputerBackupJob not available or no agent jobs found: $_"
}
# ============================================================
# Output Results
# ============================================================
if ($report.Count -eq 0) {
Write-Host "[WARN] No jobs with Application-Aware Processing enabled were found." -ForegroundColor Yellow
} else {
Write-Host "`n[RESULTS] Jobs with AAP Enabled ($($report.Count) entries):" -ForegroundColor Green
$report | Sort-Object "Job Name", "Server / VM" | Format-Table -AutoSize
$csvPath = ".\VeeamAAP_Report_$dateStr.csv"
$report | Sort-Object "Job Name", "Server / VM" |
Export-Csv -Path $csvPath -NoTypeInformation -Encoding UTF8
Write-Host "[INFO] Report exported to: $csvPath" -ForegroundColor Green
}
Disconnect-VBRServerEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.