 <p>I wrote a blog post about using SQL with PowerShell, so you can <a href="http://foxdeploy.com/2014/09/08/working-with-sql-using-powershell/" rel="nofollow">read more about it here</a>.</p> <p>We can do this easily if you have the SQL-PS module available. Simply provide values for your database name, server name, and table, then run the following:</p> <pre><code>$database = 'foxdeploy' $server = '.' $table = 'dbo.powershell_test' Import-CSV .\yourcsv.csv | ForEach-Object {Invoke-Sqlcmd ` -Database $database -ServerInstance $server ` -Query "insert into $table VALUES ('$_.Column1','$_.Column2')" } </code></pre> <p><em>To be clear, replace Column1, Column2 with the names of the columns in your CSV.</em></p> <p>Be sure that your CSV has the values in the same format as your SQL DB though, or you can run into errors. </p> <p>When this is run, you will not see any output to the console. I would recommend querying afterwards to be certain that your values are accepted.</p>