title: Replace CRLF using powershell
body: <p><sup><strong>Editor's note</strong>: Judging by later comments by the OP, the gist of this question is:
  <strong>How can you convert a file with CRLF (Windows-style) line endings to a LF-only (Unix-style) file in PowerShell?</strong></sup></p>
  
  <p>Here is my powershell script:</p>
  
  <pre><code> $original_file ='C:\Users\abc\Desktop\File\abc.txt'
   (Get-Content $original_file) | Foreach-Object {
   $_ -replace "'", "2"`
  -replace '2', '3'`
  -replace '1', '7'`
  -replace '9', ''`
  -replace "`r`n",'`n'
  } | Set-Content "C:\Users\abc\Desktop\File\abc.txt" -Force
  </code></pre>
  
  <p>With this code i am able to replace 2 with 3, 1 with 7 and 9 with an empty string.
  I am unable to replace the carriage return line feed with just the line feed.
  But this doesnt work.</p>