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, Description("The URL of the web application or site collection to configure")] string Url;
    [Required, Description("Define the scope of the configuration - either WebApplication or SiteCollection"), ValueMap{"WebApplication","SiteCollection"}, Values{"WebApplication","SiteCollection"}] string SettingsScope;
    [Write, Description("Allow the use of SharePoint Designer")] Boolean AllowSharePointDesigner;
    [Write, Description("Allow pages to be un-ghosted by SharePoint Designer")] Boolean AllowDetachPagesFromDefinition;
    [Write, Description("Allow masterpages to be changed by SharePoint Designer")] Boolean AllowCustomiseMasterPage;
    [Write, Description("Allow site URL structure to be changed by SharePoint Designer")] Boolean AllowManageSiteURLStructure;
    [Write, Description("Allow users to create declarative workflows with SharePoint Designer")] Boolean AllowCreateDeclarativeWorkflow;
    [Write, Description("Allow users to save and re-publish declarative workflows with SharePoint Designer")] Boolean AllowSavePublishDeclarativeWorkflow;
    [Write, Description("Allow users to save declarative workflows as a template from SharePoint Designer")] Boolean AllowSaveDeclarativeWorkflowAsTemplate;
    [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsAccount if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] String InstallAccount;
};