Don’t do that #4: Don’t ask the user to write in upper case

By | February 24, 2015

Don’t do that: You could write some scripts to other departments (ex: Helpdesk) and asks some input for the end user, let’s take this basic example:

$surname = Read-Host "Enter your surname (in UPPER case)"

Do that: Instead of requiring an action from the end user, it makes more sense to convert in upper case the input, it’s more reliable (the user could forget or ignore that):

$surname = (Read-Host -Prompt 'Enter your surname').ToUpper()

You should try to automate the more you can in order to be more efficient.


Leave a Reply

Your email address will not be published.