How to extract the output of a powershell command

Hi, I am trying to execute a powershell command whose output is in form of, see below:

Id. CreatedDateTime Desc DisName Email
1 10/08 12:48pm a abc abc@xyz.co
2 11/08 12:15am b def def@xyz.co
3 12/08 12:20pm c ghi ghi@xyz.co

Upon providing the command,I am selecting



the TypeArgument as object and so output variable gets stored in form of Collection

Now, I am trying to loop into this output variable… i am using for each… whose TypeArgument is same as above Invoke Powershell activity’s output i.e., Collection
But I am getting an error which says, “Unable to cast object type “Microsoft.Graph.Powershell.Models.MicrosoftGraphChannel1” to type “System.Collection.ObjectModel.Collection1[System.Object].

Can someone please help to provide some insights here!! I have tried searching for the same variable type in TypeArgument but I couldn’t… also… unable to download Powershell SDK package from manage package.

Hi @aishwarya_das ,

Could you let us know if you are using the Windows or Windows-Legacy compatibility ?

Also, Could you send screenshot of the For Each Activity that is configured with the values ?

So what?

This is still happening as of Auguts 2023