Quote:Now, I mentioned earlier about the Invoke-SQLCMD cmdlet. This is by far the easiest way to get data in and out of SQL Server in PowerShell. Set a string variable to the query you want, and use the cmdlet. If you’re getting results back, assign the invocation of the cmdlet to a variable, and those results are returned as a PowerShell object.
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)