How to get powershell input as a variable in UiPath?

I created a simple PowerShell script provide a pop-up which auto disappears in 10 sec. This script captures response as

Ok - 1
Cancle -2
and no response as - (-1)

I am able to run this script but not able to capture the value. Can someone please help me with capturing the value that powershell triggers? Attaching script and XAML - Remove .pdf to get the script filePowershell.ps1.pdf (413 Bytes)

Powershell.xaml (5.1 KB)

1 Like

have you tried this?


1 Like

So I am new to this Powershell! and I was not able to use this information. Can you please help?

yes sure… but tell me in which part you are not getting? pal

When I run this script in Powershell

$wshell = New-Object -ComObject Wscript.Shell

$wshell.Popup(“Do you want to e-file”,10,“Done”,0x1)

and Press ok, I get the value as “1”. Now I want to use this value in Uipath for the run some condition. For that, I need this value to be captured. How can I do that?

Hopefully, I am making some sense.

Never mind! I solved this problem :slight_smile: ! thanks for all the help

Hello MGDEL, please let us know how… :slight_smile:

time out (2.6 KB)

Please check these two files and let me know if you have any questions?


Sorry pal @MGDEL

Was busy with some work stuff…But You have already done with it :slight_smile: :thumbsup: