I am able trim all the contents in file
$lines=(Get-Content $BaselineFile) foreach ($line in $lines) { $line= $line.Trim() }
But how to put back the result in same file. ($Baselinefile)