How to use Start-VBRHvRestoreVM (Case #00740993)

PowerShell script exchange

How to use Start-VBRHvRestoreVM (Case #00740993)

Veeam Logoby fidelitylife » Wed Feb 11, 2015 7:00 am

There don't seem to be any examples of how to use this cmdlet.
On the support case they put me right that for HyperV one uses this cmdlet rather than 'Start-VBRRestoreVM'; however I cannot seem to invoke this without getting 'Start-VBRHvRestoreVM : Exception has been thrown by the target of an invocation.'.

I use '$restorePoint = Get-VBRRestorePoint -Name 'aserver' | Sort-Object -Property creationtime | Select-Object -Last 1' to get the latest restore point for the server - this does return an object which describes the latest restore point of the VM in question.
I use ''$restoreHost = Get-VBRServer -Type hvserver -Name 'ahost' to get a host HyperV 2012 R2 server (note, server is a member of a cluster; I also tried with the cluster object rather than the server) - this does return an object which describes the host in question.
Then boiled down just calling with 'Start-VBRHvRestoreVM -RestorePoint $restorePoint -Server $restoreHost -Path 'c:\clusterstorage\acsv'' to which I get the above error.

Anyone successfully used this cmdlet, and able to supply some examples or advice?

Cheers.
fidelitylife
Lurker
 
Posts: 2
Liked: never
Joined: Mon Mar 08, 2010 6:43 pm
Full Name: Graeme Thomas

Re: How to use Start-VBRHvRestoreVM (Case #00740993)

Veeam Logoby v.Eremin » Wed Feb 11, 2015 11:49 am 1 person likes this post

Can you execute the said script under admin account? Thanks.
v.Eremin
Veeam Software
 
Posts: 13296
Liked: 974 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: How to use Start-VBRHvRestoreVM (Case #00740993)

Veeam Logoby fidelitylife » Wed Feb 11, 2015 7:39 pm

Nailed it; thanks - I should have thought of that.

Cheers.
fidelitylife
Lurker
 
Posts: 2
Liked: never
Joined: Mon Mar 08, 2010 6:43 pm
Full Name: Graeme Thomas

Re: How to use Start-VBRHvRestoreVM (Case #00740993)

Veeam Logoby v.Eremin » Thu Feb 12, 2015 11:11 am

Based on my experience, whenever you have "Exception has been thrown by the target of an invocation", while working with script that looks good, it typically means you run a script under account with insufficient rights.

Anyway, glad to hear that everything works now as expected. Should other help be needed, don't hesitate to let us know.

Thanks.
v.Eremin
Veeam Software
 
Posts: 13296
Liked: 974 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin


Return to PowerShell



Who is online

Users browsing this forum: No registered users and 8 guests