title: Import and Export CSV using PowerShell with all columns in double quotes
body: <p>I am using below code to import and export to CSV. The reason why I am doing an export is because I need all columns in the exported CSV to be enclosed in double quotes. But with below code the double quote is only appearing at the first and last of every line. </p>
  
  <pre><code>Import-Csv c:\Emp.csv | Export-Csv c:\Emp1.csv -NoTypeInformation -Force
  </code></pre>
  
  <p>Please note that I have already tried below code (that works but takes longer time if size of CSV is > 200MB):</p>
  
  <pre><code>$inform = Get-Content C:\A.csv 
  $inform | % { 
    $info = $_.ToString().Replace("|", """|""") 
    $info += """" 
    $var = """" + $info 
    $var | Out-File D:\B.csv -Append 
  }
  </code></pre>
  
  <p>Sample input (CSV file):</p>
  
  <pre>
  1|A|Test|ABC,PQR
  </pre>
  
  <p>Sample output (CSV file):</p>
  
  <pre>
  "1"|"A"|"Test"|"ABC,PQR"
  </pre>