DSCResources/MSFT_xSPDesignerSettings/MSFT_xSPDesignerSettings.schema.mof
/*
**Description** This resource is used to set the SharePoint Designer settings for the local farm or site collections. These settings will be used to control if users are allowed to make changes using SharePoint Designer. Note that this will not prevent users from installing SharePoint Designer, just from using SharePoint Designer to connect to the farm. Settings can be applied against an entire web application, or a specific site collection. Use the "SettingsScope" property to set it to either "WebApplication" or "SiteCollection" to define which you are targetting. Known issue: When using PowerShell v4 or PowerShell v5 with the InstallAccount switch (instead of PsDscRunAsCredential), you cannot use the SettingsScope "SiteCollection". Due to an issue with Remote PowerShell and SharePoint, changing the Site Collection settings results in an Access Denied error. Consider implementing PowerShell v5 and switching to the PsDscRunAsCredential configuration. **Example** xSPDesignerSettings MainWebAppSPDSettings { Url = "https://intranet.sharepoint.contoso.com" SettingsScope = "WebApplication" AllowSharePointDesigner = $false AllowDetachPagesFromDefinition = $false AllowCustomiseMasterPage = $false AllowManageSiteURLStructure = $false AllowCreateDeclarativeWorkflow = $false AllowSavePublishDeclarativeWorkflow = $false AllowSaveDeclarativeWorkflowAsTemplate = $false PsDscRunAsCredential = $InstallAccount } */ [ClassVersion("1.0.0.0"), FriendlyName("xSPDesignerSettings")] class MSFT_xSPDesignerSettings : OMI_BaseResource { [Key] string Url; [Required, ValueMap{"WebApplication","SiteCollection"}, Values{"WebApplication","SiteCollection"}] string SettingsScope; [Write] Boolean AllowSharePointDesigner; [Write] Boolean AllowDetachPagesFromDefinition; [Write] Boolean AllowCustomiseMasterPage; [Write] Boolean AllowManageSiteURLStructure; [Write] Boolean AllowCreateDeclarativeWorkflow; [Write] Boolean AllowSavePublishDeclarativeWorkflow; [Write] Boolean AllowSaveDeclarativeWorkflowAsTemplate; [Write, EmbeddedInstance("MSFT_Credential")] String InstallAccount; }; |