New-AzRecoveryServicesAsrReplicationProtectedItem -VMwareToAzure requries a -ProcessServer of type Microsoft.Azure.Commands.RecoveryServices.SiteRecovery.ASRProcessServer, but the FabricObject only has Microsoft.Azure.Commands.RecoveryServices.SiteRecovery.ASRProcessServerDetails #19124
> Resolve-AzError
4:09:23 PM - ResolveError begin processing with ParameterSet 'AnyErrorParameterSet'.
4:09:23 PM - using account id 'CLewis@3cloudsolutions.com'...
4:09:23 PM - [ConfigManager] Got nothing from [DisplayBreakingChangeWarning], Module = [], Cmdlet = []. Returning default value [True].
Upcoming breaking changes in the cmdlet 'Resolve-AzError' :
The `Resolve-Error` alias will be removed in a future release. Please change any scripts that use this alias to use `Resolve-AzError` instead.
Note : Go to https://aka.ms/azps-changewarnings for steps to suppress this breaking change warning, and other information on breaking changes in Azure PowerShell.
HistoryId: 19
Message : Cannot bind parameter 'ProcessServer'. Cannot convert the "Microsoft.Azure.Commands.RecoveryServices.SiteRecovery.ASRProcessServerDetails" value of type "Microsoft.Azure.Commands.RecoveryServices.SiteRecovery.ASRProcessServerDetails" to type "Microsoft.Azure.Commands.RecoveryServices.SiteRecovery.ASRProcessServer".
StackTrace : at System.Management.Automation.ParameterBinderBase.CoerceTypeAsNeeded(CommandParameterInternal argument, String parameterName, Type toType, ParameterCollectionTypeInformation collectionTypeInfo, Object currentValue)
at System.Management.Automation.ParameterBinderBase.BindParameter(CommandParameterInternal parameter, CompiledCommandParameter parameterMetadata, ParameterBindingFlags flags)
at System.Management.Automation.CmdletParameterBinderController.BindParameter(CommandParameterInternal argument, MergedCompiledCommandParameter parameter, ParameterBindingFlags flags)
at System.Management.Automation.CmdletParameterBinderController.BindParameter(UInt32 parameterSets, CommandParameterInternal argument, MergedCompiledCommandParameter parameter, ParameterBindingFlags flags)
at System.Management.Automation.CmdletParameterBinderController.BindNamedParameter(UInt32 parameterSets, CommandParameterInternal argument, MergedCompiledCommandParameter parameter)
at System.Management.Automation.ParameterBinderController.BindNamedParameters(UInt32 parameterSets, Collection`1 arguments)
at System.Management.Automation.CmdletParameterBinderController.BindCommandLineParametersNoValidation(Collection`1 arguments)
at System.Management.Automation.CmdletParameterBinderController.BindCommandLineParameters(Collection`1 arguments)
at System.Management.Automation.CommandProcessor.BindCommandLineParameters()
at System.Management.Automation.CommandProcessor.Prepare(IDictionary psDefaultParameterValues)
at System.Management.Automation.CommandProcessorBase.DoPrepare(IDictionary psDefaultParameterValues)
at System.Management.Automation.Internal.PipelineProcessor.Start(Boolean incomingStream)
at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input)
--- End of stack trace from previous location ---
at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input)
at System.Management.Automation.PipelineOps.InvokePipeline(Object input, Boolean ignoreInput, CommandParameterInternal[][] pipeElements, CommandBaseAst[] pipeElementAsts, CommandRedirection[][] commandRedirections, FunctionContext funcContext)
at System.Management.Automation.Interpreter.ActionCallInstruction`6.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
Exception : System.Management.Automation.ParameterBindingException
InvocationInfo : {New-AzRecoveryServicesAsrReplicationProtectedItem}
Line : -ProcessServer $ASRFabricObject.FabricSpecificDetails.ProcessServers[0] `
Position : At line:7 char:28
+ … ocessServer $ASRFabricObject.FabricSpecificDetails.ProcessServers[0] …
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 19
Message : Cannot convert the "Microsoft.Azure.Commands.RecoveryServices.SiteRecovery.ASRProcessServerDetails" value of type "Microsoft.Azure.Commands.RecoveryServices.SiteRecovery.ASRProcessServerDetails" to type "Microsoft.Azure.Commands.RecoveryServices.SiteRecovery.ASRProcessServer".
StackTrace : at System.Management.Automation.LanguagePrimitives.ThrowInvalidCastException(Object valueToConvert, Type resultType)
at System.Management.Automation.LanguagePrimitives.ConvertNoConversion(Object valueToConvert, Type resultType, Boolean recurse, PSObject originalValueToConvert, IFormatProvider formatProvider, TypeTable backupTable)
at System.Management.Automation.LanguagePrimitives.ConversionData`1.Invoke(Object valueToConvert, Type resultType, Boolean recurse, PSObject originalValueToConvert, IFormatProvider formatProvider, TypeTable backupTable)
at System.Management.Automation.LanguagePrimitives.ConvertTo(Object valueToConvert, Type resultType, Boolean recursion, IFormatProvider formatProvider, TypeTable backupTypeTable)
at System.Management.Automation.ParameterBinderBase.CoerceTypeAsNeeded(CommandParameterInternal argument, String parameterName, Type toType, ParameterCollectionTypeInformation collectionTypeInfo, Object currentValue)
Exception : System.Management.Automation.PSInvalidCastException
InvocationInfo : {New-AzRecoveryServicesAsrReplicationProtectedItem}
Line : -ProcessServer $ASRFabricObject.FabricSpecificDetails.ProcessServers[0] `
Position : At line:7 char:28
+ … ocessServer $ASRFabricObject.FabricSpecificDetails.ProcessServers[0] …
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 19
Description
Based off this article: https://docs.microsoft.com/en-us/azure/site-recovery/vmware-azure-disaster-recovery-powershell
I should be able to retrieve an ASRProcessServer object from the $ASRFabricObject.FabricSpecificDetails.ProcessServers.
There doesn't seem to be
Issue script & Debug output
Environment data
Module versions
Error output