worked without any problems in a Cmdlet (the variables are set, of course).
After the upgrade the VMToolsQuiesce option is not set. If I enter the second code line manually some time (here is the possible race condition) afterwards the option will be set.
Same goes for
# first query the new created job
Get-VBRJob -Name "$JOBName"|Set-VBRJobAdvancedViOptions -SetResultsToVmAttribute $True -VmAttributeName "veeam" | Out-Null
#or
Get-VBRJob -Name "$JOBName"|Set-VBRJobAdvancedViOptions -SetResultsToVmAttribute $True -VmAttributeName "veeam"
No errors are printed nor exceptions thrown. Inserting "sleep" didn't help either. Has anyone else experienced the same problem? Any ideas for a remedy?
$JobOptions contains the state before setting VMToolsQuiesce for example. When writing with Set-VBRJobOptions the old state overwrites the option. It was hard to track down because those things did not happen in 4 lines of code; they were some screens apart. Plus: it worked with older versions of Veeam (I've checked the Git history of the script)