so I have a strange problem.
I’m using a powershell script that does some api calls and stuff.
I use the
PowerShellVariables property and put in 2 arguments (these work) and get back one variable which is of type
But when I run it I always get the error
Invoke Power Shell: Unable to cast object of type 'System.Management.Automation.PSCustomObject' to type 'System.Object'.
I think this is because powershell returns basically everything you store in a variable and somewhere along the line it returns one of these objects I’m about to add into the array.
Can I supress the script somehow cause I don’t need a response variable or modify the
Invoke Powershell activity in some shape or form?
Cause if I just change the
TypeArgument to the one stating in the error message, I will get the next error that now it doesn’t fit another variable it gets returned. I want to “disable” this since I dont work with the ouput or the output type just with passed in Variables that gets data into the script and out of the script.
Or am I getting this whole Activity wrong and I have to do it another way?
For example the
allUserLogs in my Powershell Script is a variable called
$allUserLogs and is an array of objects.
Here is how it looks like:
I’m really stuck here and would love to hear from you guys thank you.