Get all Text after a character
$string = "1. Computer name:DC-G11-FTW.contoso.com" $string.Substring($string.IndexOf(":")+1,$string.length-$string.IndexOf(":")-1)
Get all Text before a character
$string = "[email protected]" $string.Substring(0,$string.IndexOf("@"))