PowerShell script exchange
Post Reply
matteu
Veeam Legend
Posts: 725
Liked: 118 times
Joined: May 11, 2018 8:42 am
Contact:

Get-VBRBackupCopyJob RPO logs

Post by matteu »

Hello,

How to get the value for RPO monitor -> Log backup with Get-VBRBackupCopyJob
oleg.feoktistov
Veeam Software
Posts: 1918
Liked: 636 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: Get-VBRBackupCopyJob RPO logs

Post by oleg.feoktistov »

It's in the (Get-VBRBackupCopyJob).RpoWarningOptions. If log backup RPO monitor is not enabled, it won't show up in the property I mentioned. Thanks!
matteu
Veeam Legend
Posts: 725
Liked: 118 times
Joined: May 11, 2018 8:42 am
Contact:

Re: Get-VBRBackupCopyJob RPO logs

Post by matteu »

Thanks for your answer.

I did this :

Code: Select all

$BackupCopyJobsReq = Get-VBRBackupCopyJob
foreach ($element in $BackupCopyJobsReq)
{
    $RPOValue = ($element.RpoWarningOptions | Where-Object {$_.RpoType -eq "BackupJob"}).Value
    $RPOTimeUnit =  ($element.RpoWarningOptions | Where-Object {$_.RpoType -eq "BackupJob"}).TimeUnit
    $RPO =  if ($RPOValue){
        Write-Output "$RPOValue $RPOTimeUnit"
    }
    else {
        "Disabled"
    }
    #RPO Logs
    $RPOLogValue = ($element.RpoWarningOptions | Where-Object {$_.RpoType -eq "BackupLogJob"}).Value
    $RPOLogTimeUnit =  ($element.RpoWarningOptions | Where-Object {$_.RpoType -eq "BackupLogJob"}).TimeUnit
    $RPOLogs = if ($RPOLogValue){
        Write-Output "$RPOLogValue $RPOLogTimeUnit"
    }
    else {
        "Disabled"
    }
    [pscustomobject]@{
        Name            = $element.name
        RPOValue           = $RPO
        RPOLogValue        = $RPOLogs
    }
}
Post Reply

Who is online

Users browsing this forum: No registered users and 13 guests