Skip to content

spo propertybag set

Sets the value of the specified property in the property bag. Adds the property if it does not exist

Usage

spo propertybag set [options]

Options

Option Description
--help output usage information
-u, --webUrl <webUrl> The URL of the site in which the property should be set
-k, --key <key> Key of the property to be set. Case-sensitive
-v, --value <value> Value of the property to be set
-f, --folder [folder] Site-relative URL of the folder on which the property should be set
-o, --output [output] Output type. json|text. Default text
--verbose Runs command with verbose logging
--debug Runs command with debug logging

Examples

Sets the value of the key1 property in the property bag of site https://contoso.sharepoint.com/sites/test

spo propertybag set --webUrl https://contoso.sharepoint.com/sites/test --key key1 --value value1

Sets the value of the key1 property in the property bag of the root folder of site https://contoso.sharepoint.com/sites/test

spo propertybag set --webUrl https://contoso.sharepoint.com/sites/test --key key1 --value value1 --folder /

Sets the value of the key1 property in the property bag of a document library located in site https://contoso.sharepoint.com/sites/test

spo propertybag set --webUrl https://contoso.sharepoint.com/sites/test --key key1 --value value1 --folder '/Shared Documents'

Sets the value of the key1 property in the property bag of a folder in a document library located in site https://contoso.sharepoint.com/sites/test

spo propertybag set --webUrl https://contoso.sharepoint.com/sites/test --key key1 --value value1 --folder '/Shared Documents/MyFolder'

Sets the value of the key1 property in the property bag of a list in site https://contoso.sharepoint.com/sites/test

spo propertybag set --webUrl https://contoso.sharepoint.com/sites/test --key key1 --value value1 --folder /Lists/MyList