How can I change this script to make all the names in All CAPS?

$names = ‘john smith’, ‘ludwig van beethoven’, ‘george washington’, ‘james van der kampf’

foreach ($name in $names) {
$firstName = (Get-Culture).TextInfo.ToTitleCase($name.split()[0])

$lastName = ''
for ($i = 1; $i -lt $name.split().count; $i++) {
    if ($i -eq $name.split().count - 1) {
        $lastName += (Get-Culture).TextInfo.ToTitleCase($name.split()[$i])
    } else {
        $lastName += $name.split()[$i] + ' '
    }
}

Write-Output "$firstName $lastName"

}

add a line
for($name in $names){
$name=name.toupper()

Hi, give this a shot

$names = 'john smith', 'ludwig van beethoven', 'george washington', 'james van der kampf'
$names.ForEach({
    [string]$fistname, [string]$lastname = $PSItem.split()
    Write-Output "$($fistname.ToUpper()) $((Get-Culture).TextInfo.ToTitleCase($lastname))"
})