Forum Discussion
Mike Jansen
Nov 24, 2017Iron Contributor
PnP powershell > Howto create or edit a managed property?
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?
Thanks, Mike
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.
7 Replies
Sort By
- Franck CornuCopper Contributor
Hi Mike,
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 ;).
- Mike JansenIron Contributor
Franck Cornu Hmmm, that is just what I wanted to do, update the xml...
There is no way to do that?
- Franck CornuCopper ContributorWhy you would like to do this? Just create your MP using the SharePoint UI and then export your schema. Your new MP will be present in your XML file, no need to do any additional configurations here.