Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

How to provide input for prompts ?

$
0
0

Hi Gurus,

I am running an executable that prompts for confirmation when it is invoked,

c:\> commit.exe

Are you sure you want to continue (y/n) ? 

My script needs to call this executable (commit.exe) and then provide input to the prompt either as 'y' or 'n'. How do I take care of this in powershell, such that when I get an expected prompt, I can enter the required input?

Here I would like to enter 'y' or 'n' to the prompt.


-Pranav


Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>