Dumping VBRJobObject settings to csv

PowerShell script exchange

Dumping VBRJobObject settings to csv

Veeam Logoby DUPER508 » Tue Sep 22, 2015 4:52 pm 2 people like this post

Below is a sample script to dump VBR Job settings and object settings to CSV. You can always use the Get-Member cmdlet to see the the properties for each object. For example, Get-VBRJob | Get-Member. Then you can modify this script to get the properties that you want.

Code: Select all
$results = @()
$properties = @{JobName='';ObjectName='';Vss_Enabled=$false;Vss_IgnoreErrors=$false;Vss_IsCopyOnly=$false; SQL_BackupLogsEnabled=$false;SQL_BackupLogsFrequencyMin=0;SQL_ProxyAutoSelect=$false;SQL_RetainDays=0;SQL_TransactionLogsProcessing='';SQL_UseDbBackupRetention=$false}
Get-VBRJob | %{
$JobName = $_.name
Get-VBRJobObject -job $JobName} | %{
$ObjectName = $_.name
Get-VBRJobObjectVssOptions -ObjectInJob $_} | %{
$result = New-Object -TypeName PSObject -Property $properties;
$result.JobName = $JobName;
$result.ObjectName = $ObjectName;
$result.Vss_Enabled = $_.VssSnapshotOptions.Enabled;
$result.Vss_IgnoreErrors = $_.VssSnapshotOptions.IgnoreErrors;
$result.Vss_IsCopyOnly = $_.VssSnapshotOptions.IsCopyOnly;
$result.SQL_BackupLogsEnabled =$_.SqlBackupOptions.BackupLogsEnabled ;
$result.SQL_BackupLogsFrequencyMin = $_.SqlBackupOptions.BackupLogsFrequencyMin;
$result.SQL_ProxyAutoSelect = $_.SqlBackupOptions.ProxyAutoSelect;
$result.SQL_RetainDays = $_.SqlBackupOptions.RetainDays;
$result.SQL_TransactionLogsProcessing= $_.SqlBackupOptions.TransactionLogsProcessing;
$result.SQL_UseDbBackupRetention = $_.SqlBackupOptions.UseDbBackupRetention;
$results +=$result;
Write-host $result}

$results | export-csv c:\scripts\VBRjobobjects.csv
Posts: 1
Liked: 2 times
Joined: Fri Sep 11, 2015 10:20 pm
Full Name: Lance Kenley

Re: Dumping VBRJobObject settings to csv

Veeam Logoby Dima P. » Tue Sep 22, 2015 4:56 pm

Hello and welcome to the community!

Thanks for sharing such a useful script it’s highly appreciated and worth testing for sure. Cheers.
Dima P.
Veeam Software
Posts: 6261
Liked: 440 times
Joined: Mon Feb 04, 2013 2:07 pm
Location: SPb
Full Name: Dmitry Popov

Return to PowerShell

Who is online

Users browsing this forum: No registered users and 6 guests