title: importing csv file in powershell
body: <p>I have an issue with importing csv files in powershell. I am using following commands for read csv files. </p>
  
  <pre><code>$CsvFilePath=“D:\MyShareOuts\*.csv”
  
  $DataImport=Import-Csv -Path (Get-ChildItem $CsvFilePath)|Out-DataTable
  
  Write-DataTable -ServerInstance $server -Database $Database -TableName $Table -Username $Username -Password $Password -Data $DataImport
  </code></pre>
  
  <p>Since the <code>CsvFilePath</code> contain thousands of files with large size, importing taking long time and powershell stop working or hang for long time on <code>import-csv</code> code line. Finally importing not happen. Can any one  suggest valuable solution for make it happen successfully.</p>