$s = "name=value" # .IndexOf returns the position, or -1 if absent $i = $s.IndexOf("=") Write-Output $i Write-Output $s.Substring($i + 1)
find a substring position