Bulk changes on Veeam Backup Jobs with Powershell

October 7, 2011

Recently I had to make some changes on backup objects in Veeam backup jobs. These changes consisted of disabling Guest file system indexing for most backup objects. Since these needed to be changed on 100+ backup objects I decided to make a PowerShell script using the Veeam Backup & Replication powershell support.

The following scripts disables Guest file system indexing mode for all backup objects in all backup jobs.

# ***************************************************
# This script sets the Guest file system indexing mode to
# disabled for all backup objects within all backup jobs
# Author : Ted Steenvoorden
# Version: 1.0
# Date   : 06-10-2011
#
# ***************************************************

$jobs = Get-VBRJob | where {$_.jobtargettype -eq “Backup”} | sort name

foreach ($job in $jobs)
{
$jobobjects = Get-VBRJobObject $job

foreach ($jobobject in $jobobjects)
{
$vssoptions = get-VBRJobObjectVssOprions -Object $jobobject
$vssoptions.GuestFSIndexingType = “none”
Set-VBRJobObjectVssOprions -object $jobobject -options $vssoptions
}
}