PowerShell script exchange
vmm
Service Provider
Posts: 15 Liked: never
Joined: Nov 23, 2015 10:09 am
Full Name: Marat Akhmetianov
Contact:
Post
by vmm » Nov 26, 2015 5:24 pm
this post
Hi.
We have a problem with restoring a VM to its original location using parameter -ToOriginalLocation.
When we issue the command:
Code: Select all
Start-VBRRestoreVM -RestorePoint $rrr -Server 10.242.4.26
we can do it
But when we issue the command:
Code: Select all
Start-VBRRestoreVM -RestorePoint $rrr -Server 10.242.4.26 -ToOriginalLocation
or
Code: Select all
Start-VBRRestoreVM -RestorePoint $rrr -Server 10.242.4.26 -PowerUp $TRUE -ToOriginalLocation
we get an error:
Code: Select all
Start-VBRRestoreVM : Parameter set cannot be resolved using the specified named parameters.
At line:1 char:1
+ Start-VBRRestoreVM -RestorePoint $rrr -Server 10.242.4.26 -ToOriginalLocation
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Start-VBRRestoreVM], ParameterBindingException
+ FullyQualifiedErrorId : AmbiguousParameterSet,Veeam.Backup.PowerShell.Command.StartVBRRestoreVM
veremin
Product Manager
Posts: 20415 Liked: 2302 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:
Post
by veremin » Nov 27, 2015 9:28 am
this post
Since you're restoring VM to original location, try to disregard -Server parameter, as it's not needed here:
Code: Select all
Start-VBRRestoreVM -RestorePoint $rrr -ToOriginalLocation
Thanks.
vmm
Service Provider
Posts: 15 Liked: never
Joined: Nov 23, 2015 10:09 am
Full Name: Marat Akhmetianov
Contact:
Post
by vmm » Nov 27, 2015 10:02 am
this post
Code: Select all
PS C:\Users\Administrator> Start-VBRRestoreVM -RestorePoint $rrr -ToOriginalLocation
Start-VBRRestoreVM : Object reference not set to an instance of an object.
At line:1 char:1
+ Start-VBRRestoreVM -RestorePoint $rrr -ToOriginalLocation
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Start-VBRRestoreVM], NullReferenceException
+ FullyQualifiedErrorId : System.NullReferenceException,Veeam.Backup.PowerShell.Command.StartVBRRestoreVM
veremin
Product Manager
Posts: 20415 Liked: 2302 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:
Post
by veremin » Nov 27, 2015 10:10 am
this post
vmm
Service Provider
Posts: 15 Liked: never
Joined: Nov 23, 2015 10:09 am
Full Name: Marat Akhmetianov
Contact:
Post
by vmm » Nov 27, 2015 10:42 am
this post
Doesn't work. The issue is the same.
veremin
Product Manager
Posts: 20415 Liked: 2302 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:
Post
by veremin » Nov 27, 2015 11:09 am
this post
In overwhelming majority of cases it's related to lack of permissions. If running script as administrator doesn't resolve that, open a ticket with our support team and let them investigate it directly. Thanks.
tsightler
VP, Product Management
Posts: 6035 Liked: 2860 times
Joined: Jun 05, 2009 12:57 pm
Full Name: Tom Sightler
Contact:
Post
by tsightler » Nov 28, 2015 6:27 am
this post
I probably suggest this too often, but any chance this is on Windows 2008R2 with default Powershell 2.0? I've seen a lot of strange issues like this until Powershell is upgraded to at least 3.0.
Users browsing this forum: No registered users and 6 guests