Builder review7 min readUpdated June 5, 2026

Create test lists with non-PnP PowerShell

Use Microsoft Graph PowerShell scripts to scaffold lists, libraries, columns, and sample data for a test migration.

Quick answer

In short

A generated non-PnP PowerShell script can quickly create a destination test site’s lists, libraries, columns, and sample lookup rows using Microsoft Graph requests.

Most likely cause

First imports often fail validation because the app was generated before supporting SharePoint lists existed or before lookup lists had sample rows.

What to do next

Run the script against a test site, reload SharePoint discovery in Form Migrator, and validate dropdowns before using production data.

When to use a generated script

  • You are smoke-testing a new XSN and need matching lists quickly.
  • You do not want to use PnP PowerShell in the tenant.
  • You need sample rows so dropdowns can open during import testing.
  • You want repeatable setup for a migration demo or QA environment.

Production caution

Generated scripts are scaffolds. Review column types, required flags, lookup design, retention, sensitivity labels, permissions, content types, and library behavior before treating the script as a production provisioning artifact.

Typical run flow

  1. Install or update Microsoft Graph PowerShell.
  2. Run the script against the destination test site URL.
  3. Sign in with an account allowed to create lists and columns.
  4. Confirm all lists and sample rows were created.
  5. Return to Form Migrator and reload lists/libraries.

Keep reading the next most relevant guides for this form pattern.