$text = 'here is some text with Uppercase letters'
$c = 0
$position = foreach ($character in $text.ToCharArray())
{
$c++
if ([Char]::IsUpper($character))
{
$c
break
}
}
if ($position -eq $null)
{
'No uppercase characters detected.'
}
else
{
"First uppercase character at position $position"
$text.Substring(0, $position) + "" + $text.Substring($position)
}