The code runs fine and the VM is added to the job... but... when I look at the GUI in Veeam, the number of objects in the job doesn't update for some time... minutes (granted, server was busy at the time). Also, the Total Size value doesn't update ever unless I edit the job and manually hit recalculate.
Correct, Total Size doesn't get recalculated automatically, when you add a new object to a job via PowerShell. As to objects' update taking some time, busy SQL might have been a reason for that. Thanks.