Monday, July 4, 2016

How to Disable SharePoint Designer 2013 using PowerShell

SharePoint Designer is a great free tool from Microsoft to customize SharePoint sites and create workflows. Why should we disable SharePoint designer? Well, In some cases site owners and designers may damage SharePoint with this Powerful utility, and I've seen SharePoint designer become SharePoint destroyer! So, to prevent from irreversible damages to SharePoint, we decided to disable SharePoint designer.

You can disable Microsoft SharePoint Designer at Web application & Site collection levels.

Disable SharePoint designer at central administration
To disable SharePoint designer at central administration for a web application, follow these steps:

  • Go to SharePoint 2016 central Administration site >> Click on Application management
  • Click on Manage web applications >> Select your target Web application to disable SharePoint designer
  • From the ribbon, Click on General settings drop down and select SharePoint Designer.
    sharepoint 2013 disable sharepoint designer powershell
  • Unselect all check boxes (or whatever applicable to you) and hit OK to save!
To allow SharePoint designer to be used in this web application, revert the above steps by ticking all check boxes.

SharePoint 2013: Disable SharePoint Designer with PowerShell for a Web Application:
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue

#Get the Web Application
$webApp = Get-SPWebApplication -Identity "http://intranet.crescent.com/"

#Disable SharePoint Designer
$webApp.AllowDesigner = $False
$webApp.AllowRevertFromTemplate = $False
$webApp.AllowMasterPageEditing = $False
$webApp.ShowURLStructure = $False

$webApp.Update()

Disable SharePoint designer at site collection
SharePoint has the ability to disable SharePoint designer at individual site collection level. Here is how to disable SharePoint designer for a site collection.
  • Login to your SharePoint 2016/2013 site collection(or SharePoint online) as an administrator.
  • Click on Site Settings gear >> Select Site Settings.
  • under Site Collection Administration, select SharePoint Designer Settings.
  • Unselect all the options listed.
    disable sharepoint designer site collection powershell
So from now, SharePoint Designer will be disabled for all users including Site collection Administrators! As this is at site collection level, you'll have to repeat these steps for each site collection!

Disable SharePoint designer for a site collection using PowerShell
Here is the PowerShell script to disable SharePoint designer.
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue

#Get the site
$Site = Get-SPSite "http://intranet.crescent.com/sites/sales"

#Disable SharePoint Designer
$Site.AllowDesigner = $True
$Site.AllowRevertFromTemplate = $True
$Site.AllowMasterPageEditing = $True
$Site.ShowURLStructure = $True 
This Stops SharePoint designer from changing code! To enable SharePoint designer using PowerShell, set the $False flags to $True.
#Disable SharePoint Designer on to all site collections
Get-SPSite -Limit All | ForEach-Object {
    $Site.AllowDesigner = $False
}
How to disable SharePoint designer 2010? Refer my another post: Disable SharePoint designer in SharePoint 2010



You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.
*Sponsored


Check out these SharePoint products:

No comments :

Post a Comment

Please Login and comment to get your questions answered!

You might also like:

Related Posts Plugin for WordPress, Blogger...