Extract a RedGate SPB Backup with Powershell

Quick post on how to extract a red gate sqlbackup file back to native format using powershell.  There’s no redgate cmdlets to do this, I’m just using invoke-expression (or use the ampersand for shorthand) to extract the backups.  This will create multiple .bak files; one per each thread according to the number of threads that were specified when creating the original backup.

$file = "C:\PathToOriginalSPB_Backup\OriginalBackup.sqb"
$extractor = "C:\Program Files (x86)\Red Gate\SQL Backup 7\sqb2mtf.exe"
$destination = "C:\WhereYouWantYourExtractedBackupsToGO\NativeBackups.bak"

$params = "`"$($file)`"", "`"$($destination)`""

& $extractor $params