The spo web set property should allow users to update the value of any property supported by the Web class in SPO.
At this moment, the spo web set command supports only a handful of options that correspond to the properties of the Web class. This is similar to the Set-PnPWeb cmdlet. However, because PnP PowerShell works with CSOM, this limitation is often circumvented, by retrieving the web CSOM object, updating its properties and calling $web.ExecuteQuery() to persist the changes outside of PnP cmdlets. Because the CLI doesn't use CSOM, this isn't possible and users are limited to using whatever options are exposed by the CLI commands.
We could address this limitation by allowing users to set the value of any property exposed on the Web object. This would work only for properties that have values of simple types like bool, string or int, because complex values likely can't be serialized to string without additional logic.
We would offer rudimentary logic of checking if the specified properties are valid, by examining the latest version of the SPO CSOM assemblies and checking which properties on the Web class have setters and values of the supported types and thus can be used.
By looking at the telemetry, we can track the usage of the different properties and gradually implement native support for the most frequently used properties.
Once the approach is validated, we could implement it on other types like site, list, listitem, field, file, etc.
The
spo web setproperty should allow users to update the value of any property supported by the Web class in SPO.At this moment, the
spo web setcommand supports only a handful of options that correspond to the properties of the Web class. This is similar to the Set-PnPWeb cmdlet. However, because PnP PowerShell works with CSOM, this limitation is often circumvented, by retrieving thewebCSOM object, updating its properties and calling$web.ExecuteQuery()to persist the changes outside of PnP cmdlets. Because the CLI doesn't use CSOM, this isn't possible and users are limited to using whatever options are exposed by the CLI commands.We could address this limitation by allowing users to set the value of any property exposed on the Web object. This would work only for properties that have values of simple types like bool, string or int, because complex values likely can't be serialized to string without additional logic.
We would offer rudimentary logic of checking if the specified properties are valid, by examining the latest version of the SPO CSOM assemblies and checking which properties on the Web class have setters and values of the supported types and thus can be used.
By looking at the telemetry, we can track the usage of the different properties and gradually implement native support for the most frequently used properties.
Once the approach is validated, we could implement it on other types like site, list, listitem, field, file, etc.