Invoke power shell activity-Power Shell: Unable to cast object of type 'Microsoft.PowerShell.Commands.HtmlWebResponseObject' to type 'System.Management.Automation.PSObject

In my Invoke power shell activity …I have given command text - “Invoke-WebRequest -uri “https://theautomationcode.com””- I am getting error as Invoke Power Shell: Unable to cast object of type ‘Microsoft.PowerShell.Commands.HtmlWebResponseObject’ to type 'System.Management.Automation.PSObject…

Tried |out string with command text …then gettins as Unable to cast object of type ‘system.string’ to type 'System.Management.Automation.PSObject…

1 Like

Try adjusting the type argument to your datatype. I tried with Object datatype and got a response

image

I am not getting the status code as output

1 Like

Did you get chance to resolve this issue?

1 Like

Yes,
Change it to Object Type both the argument and your variable its resolved for me.
connect me at 9158001991