pnp / pnp/powershell

[BUG] Get-PnPSiteTemplate does not honor the includeItems parameter for the Lists handler

Open
#5,392 7 comments 0 reactions 1 assignee View on GitHub

@gautamdsheth is already working on this.

Since Aug 7, 2026.

bug
Dominant language
C#
Stars
904
Forks
407
Avg merge
9h 16m
Merged PRs (30d)
10

Description

When exporting a PnP Provisioning template using Get-PnPSiteTemplate the config schema says that we can ask for list items to be included in the template. Here is the section from the schema:

              "includeItems": {
                "description": "If set to true list items will be included as datarows in the template",
                "type": "boolean"
              },

In my usage, list items are never exported and thus are also not added to target sites.

My guess is the <pnp:DataRows /> concept was only partially implemented. The documentation stops at DataRows, with DataRow missing.

When exporting with the following config section, I'd expect to see a <pnp:DataRows /> section within the <pnp:ListInstance/> for the Events list, but it is not present.

    "lists": {
        "lists": [
            {
                "title": "Site Pages"
            },
            {
                "title": "Site Assets",
                "includeItems": true
            },
            {
                "title": "Events",
                "includeItems": true
            }
        ]
    },

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.