dataverse-solution-scanner exports every unmanaged solution in your Dataverse environments and unpacks each into a file per component. Commit them for a baseline; every later run shows what changed. Handy when you inherit an environment someone else built: the maker portal only exports one at a time.

What it does

For each environment in config/environments.json, backup-solutions.ps1:

  1. Lists its solutions with pac solution list --json and saves them to solutions/<name>/solutions.json.
  2. Skips managed solutions and Default, which can’t be exported.
  3. Exports the rest with pac solution export as unmanaged zips under _backups, ready for pac solution import. A failed export is reported and the run carries on.
  4. Unpacks each with pac solution unpack, a file per component, which is how Microsoft suggests you open a solution zip.
  5. Pulls each canvas app’s Power Fx source (Src/*.pa.yaml) out of its .msapp. That’s the part that belongs in source control.

-SkipExisting keeps solutions you already have and only fetches new ones. -Publish runs pac solution publish first, since exports only include published components. It publishes everyone’s work in progress, so it’s off by default.

Before you run it

  • Install the Power Platform CLI 2 or later (pac install latest) and PowerShell 7.
  • pac auth create with an account that can reach every environment you list.
  • Copy config/environments.template.json to config/environments.json and give each environment a name and its guid. The script checks the file against its schema before it starts; VS Code checks it as you type.

security-scan.ps1 runs regex rules over the backup. It’s a demo, and the README says not to rely on it; use TruffleHog or Kingfisher.

What it misses

  • Anything only in Default.
  • Data. Solutions carry customisations, not records.
  • Secret scrubbing. Exports can hold keys. Check before committing anywhere shared, or pasting into an AI tool.

For a development Managed Environment, Dataverse Git integration is the built-in way to keep solutions in an Azure DevOps Git repo, in a YAML format that diffs better still. Microsoft says dev only, not test or production. The script works anywhere you can sign in, when you just want a copy of what’s there.

Thumbnail: Photo by FabrikaPhoto on Envato Elements

© 2026 Ali Robertson · Accessibility · Melbourne, Australia

Thanks for exploring this site with a screen reader! On mobile: use the rotor or local context menu to navigate by headings and landmarks. On desktop: press ? to see all keyboard shortcuts.