powershell
powershell copied to clipboard
[BUG] Get-PnPSiteTemplate: -Configuration option is ignored in V2 for lists as well
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