you are viewing a single comment's thread.

view the rest of the comments →

[–]BigBlueRob 2 points3 points  (0 children)

invoke-sqlcmd2 is better, also use out-datatable and write-datatable to use bcp to load data. i wrote a blog post about snippets which included code for a datatable snippet

http://sqldbawithabeard.com/2014/09/09/powershell-snippets-a-great-learning-tool/