Nov 24 2017 07:32 AM
Nov 24 2017 07:32 AM
I try to create a provisioning solution using PnP powershell.
I'm a bit stuck at the moment. I try to create a managed property (or edit the default managed properties, like RefinableString etc.) but I cannot find a PnP command to do that.
What commands should I use to achieve this?
Nov 24 2017 12:52 PM
You can use the default SharePoint feature to do this:
- Setup your search configuration via the SharePoint interface (refinable properties, custom MP, etc.)
- Export as XML (via the UI or using the PnP cmdlet Get-PnPSearchConfiguration)
- Import your configuration via the PnP cmdlet Set‑PnPSearchConfiguration in an other site collection.
Note: don't even try to update the XML file by yourself ;).
Nov 26 2017 01:40 AM
@Franck Cornu Hmmm, that is just what I wanted to do, update the xml...
There is no way to do that?
Nov 26 2017 06:53 AM
Nov 27 2017 01:31 AM - edited Nov 27 2017 03:01 AM
If I would like to add one managed property I prefer not to export and import all managed search settings but only the one that is changed. Or does the import some kind of check? If an item exist, than skip the import of the item?
Edit: I found this one: https://gallery.technet.microsoft.com/office/Powershell-script-to-250c5aa6
Haven't test it yet but I'll give it a try
Nov 27 2017 06:32 AMSolution
If I remember correctly, SharePoint will import only changes from the default schema. You can verify easily this behavior. I've used this technique several times with no issues so I suggest you to use the supported method rather than a custom script.
Oct 05 2018 06:37 AM
Before we run this command which site collection we need to connect. I would like to export all managed property which I have created in Admin Site.
Did not received managed property when I am running this command against SharePoint admin sites as well as other sites.
Oct 09 2018 06:42 AM
ravick4u @hotmail.com I think there is no cmdlet at the tenant level. Anyway, you can export/import the schema directly using the UI (Manage search schema in the SharePoint central admin portal).