pnpframework
pnpframework copied to clipboard
[BUG] Empty Search Settings when exported via Get-PnPSiteTemplate with configuration
Issue
Using Version 2.2.0 of PnP Powershell module Powershell v 7.3.0
Preparation
Connect-PnPOnline -Url [my-sponline-tenant] -Interactive
The connecting user is site collection administrator, but an external guest user.
Expected behavior
Get-PnPSiteTemplate -Handlers SearchSettings -IncludeSearchConfiguration -Out output-search-handler.xml
Contents of searchconfig.json
{
"$schema": "https://aka.ms/sppnp-extract-configuration-schema",
"handlers": [
"SearchSettings"
],
"searchSettings": {
"include": true
}
}
Get-PnPSiteTemplate -Configuration C:\path\searchconfig.json -Out output-search-config.xml
I expect the contents of output-search-handler.xml and output-search-config.xml to be identical.
Actual behavior
- output-search-handler.xml has correct exported search settings
- output-search-config.xml has empty exported search settings
This issue should be moved to pnp/powershell, the error seems to be in GetSiteTemplate:
https://github.com/pnp/powershell/blob/d774dca91902fd34c660157c9b3e150e0e5ad950/src/Commands/Provisioning/Site/GetSiteTemplate.cs#L223
This issue can be closed when https://github.com/pnp/powershell/pull/3741 is made available.