Forum Discussion

Mike Jansen's avatar
Mike Jansen
Iron Contributor
Nov 24, 2017
Solved

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

  • Franck Cornu's avatar
    Franck Cornu
    Copper 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 ;).

     

     

      • Franck Cornu's avatar
        Franck Cornu
        Copper Contributor
        Why 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.

Resources