PowerShell script exchange
matteu
Veeam Legend
Posts: 824 Liked: 128 times
Joined: May 11, 2018 8:42 am
Contact:
Post
by matteu » Jan 26, 2024 9:09 am
this post
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: 2015 Liked: 671 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:
Post
by oleg.feoktistov » Jan 26, 2024 12:17 pm
this post
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: 824 Liked: 128 times
Joined: May 11, 2018 8:42 am
Contact:
Post
by matteu » Jan 26, 2024 12:47 pm
this post
Hello,
Oh sorry I missed it !
Thanks for your help
Users browsing this forum: No registered users and 7 guests