다음을 통해 공유


SharePoint 2016 Administraton : How to configure SharePoint Designer Settings using PowerShell

SharePoint Designer being a very powerful tool can be used to perform many operations inside SharePoint Environment, creating Workflows, External Content Types, Master Pages & Page Layouts Branding are to name a few of them.

Since Microsoft already announced that there will be no new version of SharePoint Designer to be released for SharePoint 2016 and the existing SharePoint Designer would be fully functional with it so it even becomes more important to understand the governance around this excellent tool.

Being a tool with reputation to perform so many actions it is utmost important to work around proper governance plan per Web Application basis to control this little beast.

In this article we will be going to walk through the steps and PowerShell Scripts involved in configuring the SharePoint Designer settings.

Before we start configuring the settings for SPD lets’ see what will happen if these settings are not enabled on Web Application Level

Search for SharePoint Designer and Launch it

https://howtodowithsharepoint.files.wordpress.com/2016/04/1.png?w=800

Now try opening any Site using SharePoint Designer and boom

Got an error: Access Denied!

https://howtodowithsharepoint.files.wordpress.com/2016/04/2.png?w=800

This is due to the fact that SPD usage permission has been revoked already we would be looking an obvious SharePoint Error saying access denied even if the user has full access the Site itself. This is because of the fact that SharePoint manages permissions for SPD and Sites separately.

Now in order to enable permissions for SPD we can go along with the following steps-

  • Launch Central Administration Site
  • Click on “General Application Settings”

https://howtodowithsharepoint.files.wordpress.com/2016/04/3.png?w=800

  • Click on “Configure SharePoint Designer Settings” Link under SharePoint Designer Section

https://howtodowithsharepoint.files.wordpress.com/2016/04/4.png?w=800

Select Web Application for which you want enable SharePoint Designer Settings

And in the screenshot below we can see there are four properties that need to be configured to get SPD up and running.

https://howtodowithsharepoint.files.wordpress.com/2016/04/5.png?w=800Since we are looking for automating SharePoint Configurations using PowerShell so we will configure it by PowerShell way only.

Since this article is about implementing automation for SharePoint configurations using PowerShell, so we will go along with PowerShell only.

PowerShell Commands

  • Get Web Application Object that you want to enabled with SPD usage

$webAppObj = Get-SPWebApplication -Identity http://sp-2016-dev

  • Set AllowDesigner, AllowRevertFromTemplate, AllowMasterPageEditing, ShowURLStructure properties to “true” if you want all SPD features enabled for the Web Application

https://howtodowithsharepoint.files.wordpress.com/2016/04/6.png?w=800

$webAppObj.AllowDesigner = $true

$webAppObj.AllowRevertFromTemplate = $true

$webAppObj.AllowMasterPageEditing = $true

$webAppObj.ShowURLStructure = $true

  • After setting the required properties don’t forget to call Web Application Update Method to save the changes back to database.

** $webAppObj.Update()**

Execution

  • Launch SharePoint 2016 Management Shell
  • Run the above commands

https://howtodowithsharepoint.files.wordpress.com/2016/04/7.png?w=800

Once the commands get executed we can go back to “SharePoint Designer Settings” Page to verify the changes to the properties persist.

https://howtodowithsharepoint.files.wordpress.com/2016/04/81.png?w=800Now try connecting to the Site again

https://howtodowithsharepoint.files.wordpress.com/2016/04/91.png?w=800

And since the permissions has been enabled to the Web Application for SPD Access you can be able to connect to the site with the Web Application as shown in the screen shots below-

https://howtodowithsharepoint.files.wordpress.com/2016/04/10.png?w=800

https://howtodowithsharepoint.files.wordpress.com/2016/04/11.png?w=800

That is all for this demo.

Hope you find it helpful.