It sometimes depends on the executable, but I've had good luck with this problem in the past.
First, make a text file called Y.txt. It should contain 1 character. That character is "Y" without the quotes. Make sure that when you enter the character to press the [Enter] key after the "Y" in whatever editor you're creating the file in.
Then, when you execute the exe, include a redirected input from the Y.txt file. From a command prompt, it would look like the following...
C:\DB Tools\DBCleaner\DbCleaner.exe < C:\somepath\Y.txt
... where "C:\somepath\" is the actual folder that the Y.txt file lives in.
I don't know if "Start-Process -filePath" will handle such redirection, though.
is pronounced ree-bar and is a Modenism for R
First step towards the paradigm shift of writing Set Based code: Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
If you think its expensive to hire a professional to do the job, wait until you hire an amateur. -- Red Adair
How to post code problemsHow to post performance problemsForum FAQs