Invoke Powershell is not working

There you go again.

This is what started it all. A project with only one activity, with only one Invoke Power Shell call to “Install-Module”, which triggers the infamous

System.Management.Automation.CmdletInvocationException: Cannot process argument transformation on parameter ‘CallerPSCmdlet’. Cannot convert the “System.Management.Automation.PSScriptCmdlet” value of type “System.Management.Automation.PSScriptCmdlet” to type “System.Management.Automation.PSCmdlet”. —> System.Management.Automation.ParameterBindingArgumentTransformationException: Cannot process argument transformation on parameter ‘CallerPSCmdlet’. Cannot convert the “System.Management.Automation.PSScriptCmdlet” value of type “System.Management.Automation.PSScriptCmdlet” to type “System.Management.Automation.PSCmdlet”. —> System.Management.Automation.ArgumentTransformationMetadataException: Cannot convert the “System.Management.Automation.PSScriptCmdlet” value of type “System.Management.Automation.PSScriptCmdlet” to type “System.Management.Automation.PSCmdlet”. —> System.Management.Automation.PSInvalidCastException: Cannot convert the “System.Management.Automation.PSScriptCmdlet” value of type “System.Management.Automation.PSScriptCmdlet” to type “System.Management.Automation.PSCmdlet”. 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.ConversionData1.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.ArgumentTypeConverterAttribute.Transform(EngineIntrinsics engineIntrinsics, Object inputData, Boolean bindingParameters, Boolean bindingScriptCmdlet) --- End of inner exception stack trace --- at System.Management.Automation.ArgumentTypeConverterAttribute.Transform(EngineIntrinsics engineIntrinsics, Object inputData, Boolean bindingParameters, Boolean bindingScriptCmdlet) at System.Management.Automation.ParameterBinderBase.BindParameter(CommandParameterInternal parameter, CompiledCommandParameter parameterMetadata, ParameterBindingFlags flags) --- End of inner exception stack trace --- at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception) at System.Management.Automation.Interpreter.ActionCallInstruction2.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.Interpreter.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.LightLambda.RunVoid1[T0](T0 arg0)
at System.Management.Automation.PSScriptCmdlet.RunClause(Action`1 clause, Object dollarUnderbar, Object inputToProcess)
at System.Management.Automation.PSScriptCmdlet.BeginProcessing()
at System.Management.Automation.Cmdlet.DoBeginProcessing()
at System.Management.Automation.CommandProcessorBase.DoBegin()
— End of inner exception stack trace —
at System.Activities.Statements.Throw.Execute(CodeActivityContext context)
at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.ActivityInstance.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

nouSetup.zip (36.6 KB)

1 Like