Skip to content

Instantly share code, notes, and snippets.

@SQLvariant
Created May 4, 2019 17:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SQLvariant/b7f1f8f697e2c6d135d682af84de5721 to your computer and use it in GitHub Desktop.
Save SQLvariant/b7f1f8f697e2c6d135d682af84de5721 to your computer and use it in GitHub Desktop.
Extract an .ISPAC from an SSIS Catalog and write to disk via SSIS PowerShell Provider
<# This is the SSIS Project once it's deployed #>
$Proj = Get-Item 'SQLSERVER:\SSIS\localhost\SQL2017\Catalogs\SSISDB\Folders\ProviderSolution\Projects\TestSSISProject'
$Proj | Get-Member -MemberType Methods
<# This is the theory I have #>
[byte[]] $ProjBytes = $Proj.GetProjectBytes()
[System.IO.File]::WriteAllBytes('C:\temp\ASSISPrj.ispac',$ProjBytes)
<# Dont run this piece of code, you will hate me. #>
$Proj.GetProjectBytes()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment