BRBT
BRBT

Reputation: 1487

PowerShell Read-Host

SO, in my PS script I am asking the user multiple questions.

example:

$username = Read-Host("What is your username?")
$password = Read-Host("What is your password?")
$monthName = Read-Host("Which month are you running this report for?")
$data = Read-Host("Enter the full path to the data file you would like to report?")

I know if I make a GUI I can ask all of these questions at once, however I have not made a GUI in PS before(although I am trying).

Is there any other way I can ask all of these questions at once, without building a GUI?

Thanks.

Upvotes: 1

Views: 2103

Answers (1)

Cole9350
Cole9350

Reputation: 5570

I suggest just using Primal Forms to create a gui. Its as easy as dragging and dropping windows, text boxes, buttons, ect. It generates the proper script based on what you designed and you just copy the code into PowerShell.

.. and it's FREE ! (The community edition, which is more than you'll need) .. just create an account
http://www.sapien.com/software/communitytools#PrimalFormsCE

Upvotes: 2

Related Questions