Powershell action in flow designer is showing blank output

prachishaha
Tera Contributor

Hi All,

I have created powershell action and it is giving result as success but the output is blank.

Script:

 $varop=Get-Process | Sort-Object CPU -Descending | Select-Object -First 10 Name, Id, CPU

  Write-Output $varop

I want to understand how can I get the output and use it in further steps of flow.

Thank You!!

3 REPLIES 3

Ankur Bawiskar
Tera Patron
Tera Patron

@prachishaha 

is that powershell script expected to give any output?

if yes then store that in action's output and then you can use it in flow

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi Ankur,

Thank you for your reply,

I am not getting anything in output.

prachishaha_0-1747725659134.png

I tried to pass output but its empty.

Could you please help if I am missing anything in script?

Thanks & Regards

Prachi

@prachishaha 

if the output is empty then it makes no point in setting the output in some action's output variable

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader