Using powershell, I would like to restore all VM's, made by a specific backup job, but only the latest version of the VM's.
So far I ran my tests with this script;
$respool = Get-VBRServer -Name "esx04" | Find-VBRViResourcePool -Name "test-restore"
$datastore = Get-VBRServer -Name "esx04" | Find-VBRViDatastore -Name "veeam"
$rpo = Get-VBRBackup -Name "customer1*" | Get-VBRRestorePoint -Name * | Sort-Object $_.creationtime -Descending | Select -Last 1
Start-VBRRestoreVM -restorepoint $rpo –Server "esx04" -ResourcePool $respool -Datastore $datastore
Of course, due to the parameter "Select -Last 1", the script only selects the last version of the last backupped VM, and restores it.
All other VM's in the backup job are not restored.
Does anyone know if this is possible please?
Thanks in advance