PS: Catch User Input to Variable

PS: Catch User Input to Variable

When creating a script sometimes it is pretty useful to be able to capture information from the end user and place that into a variable to be used later on in the script

# Provide the end user with a prompt
Write-Host 'Please Enter Your Username: " -forgroundcolor Yellow -NoNewLine
# Set Varible and Read from user input
$Username = Read-Host
Advertisements