Allow custom scripts or web parts in SharePoint through PowerShell

If you installed a store app in SharePoint which comes with a web part and you can’t seem to find that web part when editing a page, you most likely don’t have custom scripting enabled on your SharePoint site collection. To enable this through PowerShell, use the following script.

Add-PSSnapin Microsoft.SharePoint.PowerShell
$SiteUrl="https://inspyrsolutions.sharepoint.com/"
Connect-SPOService $SiteUrl
Set-SPOSite $SiteUrl -DenyAddAndCustomizePages 0
Filed under: Blog

No comment yet, add your voice below!


Add a Comment

Your email address will not be published. Required fields are marked *

Comment *
Name *
Email *
Website

This site uses Akismet to reduce spam. Learn how your comment data is processed.