Hello all,
I am create script for automation of adding server into SRM with requested settings, like priority, postRecoverySteps and so on.
I am strugled in the last step to set the requested settings to the SRM plan over a method srmPlan.SetRecoverySettings(vm, settings) with the following error:
Exception calling "SetRecoverySettings" with "2" argument(s): "fault.drextapi.fault.InvalidArgument.summary"
At C:\PowerShell\srm\SRM-Cmdlets\SrmFunctions.ps1:726 char:3
+ $RecoveryPlan.SetRecoverySettings($moRef, $RecoverySettings)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : VimException
Could anybody help me with this,
thank you all in advance.
I fixed this for me few weeks ago and the fix was really pitty, as I forgot to read RecoveryPriority string definitions,
So the whole issue was that I used "high" instead of "higher", so this was the issue
The fault seems to say that one or more of the values in yoru parameters are not what the method expects.
How did you get the parameter values?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Hi LucD,
I have used the srmFunctions provided by Ben Meadowcroft here PowerCLI – BenMeadowcroft.com and fill the settings in pretty same way, so I exactly defined the value for "RecoveryPriority" and for "FinalPowerState".
I tried it by my own way, that is more coded than Ben provided in his helper functions, but here I really follow his post.
Just to make, you are also doing this in SRM 5.8? Or a later version?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
I am doing this in the SRM 6.1.1 and powerCLI is version 6.0 R1
I fixed this for me few weeks ago and the fix was really pitty, as I forgot to read RecoveryPriority string definitions,
So the whole issue was that I used "high" instead of "higher", so this was the issue