I am new to PowerShell, but not scripting.
Why does this script:
$usr = "john.doe"
$usrname = $usr -split ".", 0, "simplematch"
$fullname = upperInitial($usrname[0]) + upperInitial($usrname[1])
write-host "Hello $fullname"
function upperInitial($upperInitialString) {
return $upperInitialString.substring(0, 1).toupper() + $upperInitialString.substring(1).tolower()
}
return me just 'Hello John' and not 'Hello John Doe'?