The following forum posts deal with this limitation:
powershell-f26/scripting-surebackup-wit ... 75341.html
powershell-f26/case-04970788-change-sta ... 76190.html
powershell-f26/veeam-10-application-gro ... ml#p395366
veeam-backup-replication-f2/is-it-possi ... 76172.html
The good news: there is workaround for this! The idea is to add VM you want to test temporary to the backup job explicitly - Special thanks to @lessi001 who had the great idea! Then it is possible to add VM to SureBackup even the original job used tag-based VM selection. When this is done, VM can be removed from job again. Probably some script snippets will illustrate this better.
Set SureBackup startup options:
Code: Select all
$VbsStartOptions = New-VBRSureBackupStartupOptions -AllocatedMemory 100 -EnableVMHeartbeatCheck:$true -EnableVMPingCheck:$true -MaximumBootTime 900 -ApplicationInitializationTimeout 900
Code: Select all
$TestVMObject = Find-VBRViEntity -Name $TestVMname
$TestVMVbrJob = Get-VBRJob -Name $TestVMJobname
Code: Select all
Add-VBRViJobObject -Job $TestVMVbrJob -Entities $TestVMObject
Code: Select all
$VbrJobObject = Get-VBRJobObject -Job $TestVMVbrJob -name $TestVMObject.Name | Where-Object {$_.type -eq "Include"}
Code: Select all
$SbVMs += New-VBRSureBackupVM -VM $VbrJobObject -StartupOptions $VbsStartOptions
Code: Select all
Remove-VBRJobObject -Objects $VbrJobObject -Completely
Code: Select all
$AppGroup = Add-VBRViApplicationGroup -Name $AppGroupName -VM $SbVMs}
When this post is interesting for you, you possibly working with the script from Luca Dell’Oca: https://www.virtualtothecore.com/can-te ... surebackup. Keep in mind, in order to use the described new commands you need the backup job as parameter. This was not necessary with the old ones. Because of this, Luca's script uses a hashtable with just VM name. i personally think it is a good idea to replace this hashtable by an array that includes the job name. Works at least fine for me.