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

Backup copy RPO notification

Post by matteu »

Hello,

I'm trying to configure with powershell the RPO warning notifications.
It works fine if I enable backup or log but I don't find a way to enable both at the same time.

This is what I tried but the last one erase the first one

Code: Select all

$job = Get-VBRBackupCopyJob -Name "bkpcopy_dc"
$BackupRPO = New-VBRRPONotificationOption -EnableRPOWarning -Value 5 -TimeUnit Hours -RPOType BackupJob
$BackupLogsRPO = New-VBRRPONotificationOption -EnableRPOWarning -Value 5 -TimeUnit Hours -RPOType BackupLogJob

Set-VBRBackupCopyJob -Job $job -RPOWarningOptions $BackupRPO
Set-VBRBackupCopyJob -Job $job -RPOWarningOptions $BackupLogsRPO
oleg.feoktistov
Veeam Software
Posts: 1918
Liked: 636 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: Backup copy RPO notification

Post by oleg.feoktistov »

HI matteu,

Set-VBRBackupCopyJob supports an array of RPOWarningOptions, so try to add both of the specs you created to an array and pass it to the Set cmdlet:

Code: Select all

$job = Get-VBRBackupCopyJob -Name "bkpcopy_dc"
$RpoOptions = @()
$BackupRPO = New-VBRRPONotificationOption -EnableRPOWarning -Value 5 -TimeUnit Hours -RPOType BackupJob
$RpoOptions += $BackupRPO
$BackupLogsRPO = New-VBRRPONotificationOption -EnableRPOWarning -Value 5 -TimeUnit Hours -RPOType BackupLogJob
$RpoOptions += $BackupLogsRPO
Set-VBRBackupCopyJob -Job $job -RPOWarningOptions $RpoOptions
Best regards,
Oleg
matteu
Veeam Legend
Posts: 725
Liked: 118 times
Joined: May 11, 2018 8:42 am
Contact:

Re: Backup copy RPO notification

Post by matteu »

Hello,

Oh sorry I missed it !

Thanks for your help :)
Post Reply

Who is online

Users browsing this forum: No registered users and 15 guests