Restore RedGate Backups using Powershell

This actually iterates a list of folders in a directory, grabs the latest backup from each folder, restores it and then does an integrity check on said restored database. Unfortuantely, RedGate has no cmdlets for doing this, so it’s strictly passing sql strings into Invoke-sqlcmd based. This also checks the filelist in the backups and will move the data/log files to a location that you specify. Use at your own risk.

Sure, you could do that. I can’t remember the circumstances that I coded this up for, but it *could* have been for restoring older than the latest backups. I’ve got a good memory, it’s just really, really short. 😉