powershell icon indicating copy to clipboard operation
powershell copied to clipboard

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

Open CodingSinceThe80s opened this issue 2 years ago • 0 comments

I am seeing the same exact behavior as reported in https://github.com/pnp/powershell/issues/171#issue-793754415 but it was marked as fixed by @erwinvanhunen in that particular version. Unfortunately it seems to have re-emerged in 2.2.0 so I am posting it again.

Reporting an Issue or Missing Feature

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

Expected behavior

config.json:

{
    "$schema":"https://aka.ms/sppnp-extract-configuration-schema",
    "handlers": [
        "Lists"
    ]
}
Get-PnPSiteTemplate -Configuration .\config.json -Out .\template.xml

Result: An xml document containing lists only will be exported.

Actual behavior

Same exact behavior as: Get-PnPSiteTemplate -Out .\template.xml

Steps to reproduce behavior

I used a modern communication site collection.

Connect-PnPOnline -ClientId xxx -CertificatePath xxx -CertificatePassword xxx -Tenant "mytenant.onmicrosoft.com" -Url <site>
Get-PnPSiteTemplate -Configuration .\config.json -Out .\template.xml

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

2.2.0

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

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

CodingSinceThe80s avatar Dec 08 '23 09:12 CodingSinceThe80s