Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SPSitePropertyBag: Add resource to set site collection property bag #885

Closed
jensotto opened this issue Sep 19, 2018 · 7 comments · Fixed by #1045 or #1060
Closed

SPSitePropertyBag: Add resource to set site collection property bag #885

jensotto opened this issue Sep 19, 2018 · 7 comments · Fixed by #1045 or #1060
Assignees
Labels
resource proposal The issue is proposing a new resource in the resource module.

Comments

@jensotto
Copy link
Contributor

Description

Add a resource for modifying site collection property bag. This could be similar to the existing SPFarmProeprtyBag

Proposed properties

SiteCollectionUrl: The URL of the site collection
Key: The key of the SPSite property bag
Value: Value of the SPSite property bag
Ensure: Set to present to ensure the SPSite property exists, or absent to ensure it is removed

Special considerations or limitations

I'm debating if this resource is really needed as it's easy to just use CSOM and SharePoint PnP PowerShell. It might however be useful in some cases.

@ykuijs ykuijs added discussion The issue is a discussion. resource proposal The issue is proposing a new resource in the resource module. labels Sep 19, 2018
@ykuijs
Copy link
Member

ykuijs commented Sep 19, 2018

This is indeed a debatable resource. Up until now we have limited ourself to resources that do not go deeper than site collection level (SPWeb is an exception because that was fully developed and submitted as a PR. Was a waste of time not to include it ;-)). Mainly because this can cause conflict with actions of site owners, for example:
A configuration contains a SPWeb resource to create a subsite. The site collection owner deletes that site. SharePointDsc detects that and recreates the site again. That can cause confusion with the site collections owners/admins.

In this case, the site collection property bag cannot be set via the UI, which makes it less likely that site collection owners will update these settings themselves. However, like you say it is possible to set these via CSOM or PnP PowerShell.

@NikCharlebois What is you opinion on this resource suggestion?

@ykuijs
Copy link
Member

ykuijs commented Sep 28, 2018

@NikCharlebois Am interested in your opinion on this resource suggestion.

@NikCharlebois
Copy link
Contributor

NikCharlebois commented Oct 1, 2018

I am also on the fence for whether or not it makes sense to include it. I have always been against using DSC for data (basically anything that you don't need Central Admin to create). However, from a ReverseDSC perspective where you wish to recreate an empty copy of an existing farm, but do not plan on bringing the content databases over, it makes a lot of sense. Because of this scenario, I'd say it would be a great addition to the module. I know tons of 3rd party that won't function properly without this, and it has been an issue for some DSC engagement in the past.

@ykuijs ykuijs added help wanted The issue is up for grabs for anyone in the community. and removed discussion The issue is a discussion. labels Oct 5, 2018
@ykuijs
Copy link
Member

ykuijs commented Oct 5, 2018

There is no UI for configuring these settings anywhere, not in Central Admin nor in a Site Collection. That is why I am in favor of adding this resource.

Let's go for it! Marking it as "Help Wanted"

@ykuijs ykuijs self-assigned this Mar 22, 2019
@ykuijs ykuijs added in progress The issue is being actively worked on by someone. and removed help wanted The issue is up for grabs for anyone in the community. labels Mar 22, 2019
@kwirkykat kwirkykat removed the in progress The issue is being actively worked on by someone. label Apr 1, 2019
@shurick81
Copy link

Hi, two questions:

  1. Does SPSite in SharePoint even have property bag?
  2. Is this change documented in SharePointDsc Wiki?

@ykuijs
Copy link
Member

ykuijs commented Apr 23, 2019

Good point, the SPSite object doesn't have a property bag, but the RootWeb has. Although technically this would make it a SPWeb property bag :-p

Not sure how this slipped my testing. Will update the resource!

@ykuijs ykuijs reopened this Apr 23, 2019
@ykuijs
Copy link
Member

ykuijs commented Apr 23, 2019

The Wiki doc can be found here

@ykuijs ykuijs added the in progress The issue is being actively worked on by someone. label Apr 23, 2019
@ykuijs ykuijs mentioned this issue May 2, 2019
9 tasks
@kwirkykat kwirkykat removed the in progress The issue is being actively worked on by someone. label May 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
resource proposal The issue is proposing a new resource in the resource module.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants