How do I automatically answer “yes” to a prompt in Powershell?

Using ECHO worked for me. I am running RSKeyMgmt.exe in my Powershell script and it prompted Yes(Y)/ No(N). So when I do

ECHO Y | RSKeyMgmt.exe...

It did not prompt the question and the command was executed correctly.

So I think ECHO 'someoption' should work for other cases too.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)