$s = " padded " # .Trim removes leading and trailing whitespace Write-Output "[$($s.Trim())]"
strip surrounding whitespace