Q. How can I securely get input from a user using PowerShell?
A. It's typical to pass information to cmdlets as parameters however its also possible to read input from the user with:
$name = Read-Host "Who are you?"
If you wish to store a sensitive value that should not display to screen as its entered add -AsSecureString, for example:
$pass = Read-Host "What's your password?" -AsSecureString
If you later wanted to convert the secure string to plain text use: