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