$raw = " 42 " $clean = $raw.Trim() # right-align in width 6: " 42" "[" + $clean.PadLeft(6) + "]"
strip surrounding space, then right-align in a field