Please see the attached docx for the more details.
Generally, I want to a script that will backup a SQL Express DB, restore to a temp DB, allow me to run a SQL script against the temp DB, and then backup that temp DB. I have a list of constants in the docx file that I want declared at the top of the script (so I can change them to fit my environment).
I think it will pretty much be calling the following cmdlets in the necessary order: Backup-SqlDatabase, Restore-SqlDatabase, and Invoke-Sqlcmd.
hey - I can help you with this. I work with Powershell and sql cmdlets on a daily basis. Assuming you can access both SQL instances from wherever you will run this script from and you don't want db files renamed etc. I can turn this around for you this evening. thanks john