I need to build a PS script that will call upon the MSSQL db and pass through a t-sql query to backup a database, then, restore the backup into another DB on the same server.
I just recently started getting into powershell, and, I love the power it brings to the table. So I was curious to a backup example in powershell for SQL DB.
Vitor Montalvão
Ok but for SQL Server whenever you can, use proprietary scripts.
Check the link I've posted in my last comment to see if it helps you.