Whenever I do a Read-Host
the prompt always ends in :
is there anyway to change this? is it -Prompt Flag?
As mentioned in the comments, there's no way to control how the executing host application presents the prompt when passing a Prompt
message parameter argument.
What you can do instead, is call $Host.UI.ReadLine()
directly from your script and prepend a message yourself:
Write-Host "No colons here>" -NoNewLine
$UserInput = $Host.UI.ReadLine()
Here's an example of what that looks like in powershell.exe
:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With