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.
-
- Lurker
- Posts: 2
- Liked: never
- Joined: Mar 08, 2010 6:43 pm
- Full Name: Graeme Thomas
- Contact:
-
- Product Manager
- Posts: 20415
- Liked: 2302 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: How to use Start-VBRHvRestoreVM (Case #00740993)
Can you execute the said script under admin account? Thanks.
-
- Lurker
- Posts: 2
- Liked: never
- Joined: Mar 08, 2010 6:43 pm
- Full Name: Graeme Thomas
- Contact:
Re: How to use Start-VBRHvRestoreVM (Case #00740993)
Nailed it; thanks - I should have thought of that.
Cheers.
Cheers.
-
- Product Manager
- Posts: 20415
- Liked: 2302 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: How to use Start-VBRHvRestoreVM (Case #00740993)
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.
Anyway, glad to hear that everything works now as expected. Should other help be needed, don't hesitate to let us know.
Thanks.
Who is online
Users browsing this forum: No registered users and 12 guests