2

Is there a way to create an input box which already has a predefined value in the textfield ?

Preferred way whould be Read-Host

1 Answer 1

5

I don't think it can be done with Read-Host, but you could still do it from Powershell by using the underlying .NET classes as follows:

[System.Reflection.Assembly]::LoadWithPartialName('Microsoft.VisualBasic')
$Value = [Microsoft.VisualBasic.Interaction]::InputBox("Enter Value", "Test", "Default Value")
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.