How to enable scripting capabilities with PowerShell

Applies To: SharePoint Online


Crow Canyon NITRO Studio requires that custom scripting should be enabled in the SharePoint site.

Please refer this Microsoft article to enable scripting from the SharePoint admin center. It takes about 24 hours for this change to take effect for the sites. To enable scripting immediately for the site using PowerShell, please follow the detailed steps given below. Note that enabling the scripting from SharePoint admin center is still required as otherwise it overrides the settings done using PowerShell (in about 24 hours).

Steps to enable scripting using PowerShell

  1. Download and Install Windows Management Framework 5.1 (if the Operating System is not Windows 10)
  2. Download and Install SharePoint Online Management Shell
  3. Open SharePoint Online Management Shell from Windows Start Menu
  4. Connect to your SharePoint Admin Portal

  • Sign in
  • Enter the username and password for the user who has tenant admin permissions5. Enable Scripting Capabilities on your site
  • Enter the following command to enable scripting capabilities on your site:
    • Set-SPOsite <Site Collection URL> -DenyAddAndCustomizePages 0
  • We need to enter the site collection URL for <Site Collection URL>
    • E.g. Site Collection URL:


Leave a Reply