$string.Substring Index/Length exception

Your first argument is that starting position in the string, and the second is the length of the substring, starting at that position. The expression for the 2 characters at positions 68 and 69 would be:

$parameter = $string.Substring(68,2)

Leave a Comment