PowerShell script exchange
Post Reply
vraengmose
Influencer
Posts: 16
Liked: 2 times
Joined: Jun 18, 2019 9:46 am
Full Name: Thomas Trolle Vrøngmose
Contact:

list all backup jobs with "Guest file System indexing"

Post by vraengmose »

Hi

I am looking for a way to list all backup jobs with "Guest file System indexing" enabled. Anybody have a god way to do this in powershell?

Thanks ind advanced!
veremin
Product Manager
Posts: 20415
Liked: 2302 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: list all backup jobs with "Guest file System indexing"

Post by veremin » 3 people like this post

Check this example:

Code: Select all

Get-VBRJob | where {$_.GetVSSOptions().WinGuestFSIndexingOptions.IsIndexingRequired -eq $True}
Thanks!
vraengmose
Influencer
Posts: 16
Liked: 2 times
Joined: Jun 18, 2019 9:46 am
Full Name: Thomas Trolle Vrøngmose
Contact:

Re: list all backup jobs with "Guest file System indexing"

Post by vraengmose » 1 person likes this post

You are awesome V.EREMIN Thanks again!!
eduzimrs
Service Provider
Posts: 56
Liked: 7 times
Joined: Jul 25, 2018 5:08 pm
Full Name: Eduardo Scheffer
Location: Florianopolis - Brazil
Contact:

Re: list all backup jobs with "Guest file System indexing"

Post by eduzimrs »

Hi,

Anyone knows the name of the variable below (image)?
The script above works, but it always return true (despite wheatear it is enabled or not within the Job config), i'd like to compare the variable ("WinGuestFSIndexingOptions.IsIndexingRequired") along the one below, in order to match if the job is set to process indexing of VMs.


Image
--
Best Regards.
Eduardo K. Scheffer - SE
oleg.feoktistov
Veeam Software
Posts: 2010
Liked: 670 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: list all backup jobs with "Guest file System indexing"

Post by oleg.feoktistov » 1 person likes this post

Hi Eduardo,

What version of VBR are you using? Also, what type of job is it?

Thanks,
Oleg
david.domask
Veeam Software
Posts: 2123
Liked: 513 times
Joined: Jun 28, 2016 12:12 pm
Contact:

Re: list all backup jobs with "Guest file System indexing"

Post by david.domask » 1 person likes this post

@eduzimrs,

I think it's just related to the internal method no longer being maintained.

The actual cmdlet for this Get-VBRJobVSSOptions looks to work appropriately:

Code: Select all

PS C:\Users\Administrator> $job.GetVssOptions().WinGuestFSIndexingOptions

Enabled            : False
Type               : EveryFolders
IncludedFolders    : {}
ExcludedFolders    : {}
IsIndexingRequired : True

PS C:\Users\Administrator> $vss = Get-VBRJobVSSOptions -Job $job
PS C:\Users\Administrator> $vss.WinGuestFSIndexingOptions

Enabled            : False
Type               : None
IncludedFolders    : {}
ExcludedFolders    : {}
IsIndexingRequired : False
So I recommend use the official cmdlet -- fetch your job to some variable and call the VSS options with Get-VBRJobVSSOptions
David Domask | Product Management: Principal Analyst
Post Reply

Who is online

Users browsing this forum: No registered users and 18 guests