PowerShell script exchange
Post Reply
tdewin
Veeam Software
Posts: 1775
Liked: 646 times
Joined: Mar 02, 2012 1:40 pm
Full Name: Timothy Dewin
Contact:

Excluding Guest Files with Bitlooker

Post by tdewin » 2 people like this post

For those looking for a way to exclude guest files on jobs via powershell. Here is an example that will excludes files on all jobs that match Test (have "Test" in their name)

Code: Select all

asnp veeampssnapin

$jobs = get-vbrjob
foreach ($job in ($jobs | ? { $_.name -match "Test" })) {
    $objects = $job | Get-VBRJobObject
    foreach ($object in $objects) {
        $vss = Get-VBRJobObjectVssOptions $object
        $vss.GuestFSExcludeOptions.BackupScope = [Veeam.Backup.Model.EGuestFSBackupScope]::ExcludeSpecifiedFolders
        $vss.GuestFSExcludeOptions.ExcludeList = "d:\iso\*.iso"
        Set-VBRJobObjectVssOptions -Object $object -Options $vss
    }
}
Post Reply

Who is online

Users browsing this forum: No registered users and 13 guests