Exception while executing powershell script from studio (Invoke Powershell)

Hi,

I am getting the below error while executing the Powershell script using Invoke Powershell activity. It would be great if someone could help me with this.

Error -
Source: Invoke Power Shell (Throw)

Message: 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”.

Exception Type: System.Management.Automation.CmdletInvocationException

PS Script -

Hi,

I see noone replied to this in more than 5 months.

Well, after converting my project from Windows Legacy to plain Windows I’m experiencing the same exception when invoking a PowerShell command that, otherwise, had been executing flawlessly before converting the project:

Invoke Power Shell: 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”

Not to say that I’m not assigning any results to any output variable or anything.

Still no answers; OMG!

We are investigating the issue and we are working on a fix. Unfortunately, we were unable to fix it within the 23.10 timeline, but we are hoping to fix the issue in one of the next releases.

We are going for a comprehensive fix that will accommodate all of the reported issues around PowerShell in Windows projects, and this is why we need to spend extra time on it to avoid rushed fixes that would make things worse.

Hi @loginerror ; I really appreciate your involvement in the last comments, and understand that it takes time to fix it, but… did you notice my previous comment was from August? Did you see the original post was from March?

There’s also a similar thread here, dating from May:

Invoke Powershell is not working - Help / Forum - UiPath Community Forum

Even the thread you are referencing to it’s 10 months old…

Invoke PowerShell with ActiveDirectory module not working - Help / Activities - UiPath Community Forum

Sorry for sounding rude but being such an old and serious bug with several reports… it seems to me it took long to get taken seriously…

No worries, I get the frustration. Even though we didn’t sit still around this issue, we were not as quick as we should have been, given the impact on the old projects that get migrated to Windows ones.

The good news is that we will be realising the fix in one of the next releases.

1 Like

@loginerror – Do we have any update on this since OCT… We are facing similar issue

The upcoming System 23.12 package will include a big improvement to the Invoke Powershell activity by allowing you to choose your execution mode. We are also working on improving our documentation around this activity to cover as much ground as possible (so our users will not have to guess how it works).

Any updates on ETA of this release/fix?