Create Indexed(Queryable via Search) Web PropertyBag using PnP and PowerShell

PropertyBag set against SharePoint web object can be indexed which means a corresponding crawled property is created by Search. If search managed properties are created against the crawled property (property bag values), custom search display templates can be created to provide a site directory solution.

The post by Phil Harding Set a PropertyBag Property as Indexed (Queryable via Search) using CSOM + Powershell   describes how to create an indexed property on premises using the collection “IndexedPropertyKeys”.


However with CSOM, the collection “IndexedPropertyKeys” is not present. Indexed property can be added to another property instead “vti_indexedpropertykeys”.  Phil provided the following code how to add an indexed property.

Fortunately with SharePoint PnP, the indexed property can be added using one line of code.

Set-SPOPropertyBagValue -Key "EDRMS_Usage" -Value "Collaboration" -Indexed



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s