Giving a predefined value to a Read-Host operation in powershell

Viewed 25

How can I get a .ps1 script to automatically select the options that I want?

I am trying to automate the installation of a specific software on my docker containers.

This software is installed my running a .ps1 installation script, but when I run it, I get promted for several options. I want to create my own .ps1 script, that automatically runs the installation script, and chooses the options that I want.

When I run the installation script, all the promts looks like this:

Select the Product you wish to install:

Option Product           
------ -------           
[1]    Software 1
[2]    Software 2

Please, select one of the Products available:

Select the Language you wish to install:

Option Language           
------ -------           
[1]    Language 1
[2]    Language 2

Please, select one of the Languages available:

... and so on.

0 Answers
Related