How can I configure a read-host statement in powershell to accept input that contains spaces
Posted on 2013-06-03
Hello Powershell Experts,
I'm working on a script that will update some AD information for users. I identify the user that for which the script will run with a read-host statement. The read-host statement is currently configured as:
read-host "Input the username"
I would input nickd (as our usernames are firstname + first initial of the last name") and everything works fine.
I want to change the read-host statement to:
read-host "Input the first and last name"
How can I do this? The space between the firstname and the lastname are causing issues.
Thanks in advance.