Bulk changes on Veeam Backup Jobs with Powershell


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
}
}

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: