Skip to content

[BUG] Get-PnPSiteTemplate: -Configuration option is ignored in V3 for lists as well #4918

Open
@rudolfhandoko

Description

@rudolfhandoko

This issue is now occurring with V3. It was reported as bug in V1 #171 (comment), V2 #3626 and both had been marked as resolved. This report is based on version 3.1.0.

Reporting an Issue or Missing Feature

When using Get-PnPSiteTemplate with -Configuration option, the configuration is ignored

Expected behavior

Example config.json file used:

{
  "$schema":"https://aka.ms/sppnp-extract-configuration-schema",
  "handlers": [
    "Lists",
    "WebSettings",
    "Pages"
  ]
}

Generated .xml file should only contain specified handlers: lists, web settings, and pages.

Actual behavior

All artifacts are extracted similar to running:
Get-PnPSiteTemplate -Out .\template.xml

Steps to reproduce behavior

Connect-PnPOnline <site>
Get-PnPSiteTemplate -Configuration .\config.json -Out .\template.xml

What is the version of the Cmdlet module you are running?

3.1.0

Which operating system/environment are you running PnP PowerShell on?

  • Windows
  • Linux
  • MacOS
  • Azure Cloud Shell
  • Azure Functions
  • Other : please specify

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions