I would like to prompt the user (“Enter value=”) for an input string.
The entered string should be assigned to variable “inputvarr”
How can I code this?
I would like to prompt the user (“Enter value=”) for an input string.
The entered string should be assigned to variable “inputvarr”
How can I code this?
Have you read the help for Read-Host
?
$variable = read-host "Enter the number of your choice "
write-host ("The number you chose is {0}" -f $variable)
try that.
thank you!