Powershell v2: Replace CRLF with LF
问题 Using Powershell v2 called from a batch file, I want to replace each CRLF in a file with just an LF. If a file only has LF without any CR, then I want all the LF to be left alone. I do not want a terminating CRLF in the resultant file, if possible. I found this question here on Stack Overflow, that seems to be a close match, but it does not specify a Powershell version requirement, nor does it specify the other criteria above. Hence this question. The accepted answer for that question