Code: Select all
$restorepoint = Get-VBRRestorePoint -Name myserver
$server = Get-VBRServer -Name "myesx.local"
$rpool = Find-VBRViEntity -ResourcePools -Server "myvcenter.local" -Name "MY-CLUSTER"
$datastore = Find-VBRViDatastore -Server $server
Start-VBRRestoreVM -Restorepoint $restorepoint[1] -Server $server -ResourcePool $rpool -Datastore $datastore
Here is the echo result of my $rpool variable :
Code: Select all
PS C:\PROD\shell> echo $rpool
ConnHostId : 9c1acd1d-22bf-4d07-909f-e865ab53914e
Type : Datacenter
Reference : datacenter-21
Id : 9c1acd1d-22bf-4d07-909f-e865ab53914e_datacenter-21
Name : MY-CLUSTER
Path : myvcenter.local\MY-CLUSTER
Any idea why it's not working ? Thanks for the help
The error i get (it's in french sorry) :
Code: Select all
Start-VBRRestoreVM : Impossible de valider l'argument sur le paramètre « ResourcePool ». L’argument est Null. Spécifiez une valeur valide pour l’argument, puis réessayez.
Au caractère Ligne:5 : 81
+ ... repoint $restorepoint[1] -Server $server -ResourcePool $rpool -Datast ...
+ ~~~~~~
+ CategoryInfo : InvalidData : (:) [Start-VBRRestoreVM], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationError,Veeam.Backup.PowerShell.Cmdlets.StartVBRRestoreVM