Skip to content

Instantly share code, notes, and snippets.

@garrytrinder
Last active March 10, 2022 10:42
Show Gist options
  • Save garrytrinder/ac5e64f616bf2b786b876f27ce7db87f to your computer and use it in GitHub Desktop.
Save garrytrinder/ac5e64f616bf2b786b876f27ce7db87f to your computer and use it in GitHub Desktop.
Unpacks a Power Platform solution and unpacks the Canvas Apps contained within using Power Platform CLI
# unpack the solution
pac solution unpack --zipFile "$((Get-Location).Path)\export\solution.zip" --folder "$pwd\solution"
# extract canvas apps
$canvasapps = Get-ChildItem -Path .\solution\CanvasApps\* -Include *.msapp
$canvasapps | Foreach-Object {
pac canvas unpack --msapp $_.FullName --sources "$((Get-Location).Path)\canvasapps\$($_.Name.Split("_")[1])"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment