How to enable Scripting Capabilities with PowerShell

  1. Download & Install SharePoint Online Management Shell
  2. Open SharePoint Online Management Shell
  3. Connect to your SharePoint Admin Portal
  4. Execute the following PowerShell command: Set-SPOsite https://your-domain.sharepoint.com/site-path -DenyAddAndCustomizePages 0
  5. That's this

This article is for

  • You faced this issue while running ShortPoint Installation: "The installation has failed, please try again!"
  • Enable Scripting Capabilities on modern sites
  • Enable Scripting Capabilities on group sites
  • Enable Scripting Capabilities on any other sites and without waiting for 24 hrs
  • Enable Scripting Capabilities on specific site only
  • If you are more comfortable typing PowerShell commands ~nice to meet you :)

Introduction

Enable Scripting Capabilities on modern sites and other sites

Scripting capabilities are not enabled with modern sites (and other sites) by default, and cannot be enabled using the admin portal for modern sites. You can not install ShortPoint Add-In on modern sites if scripting capabilities are not enabled. 

  • The only way to enable scripting capabilities on modern sites is using power shell. 
  • You need to have access to your SharePoint Admin Portal. The URL will look like this https://your-domain-admin.sharepoint.com

How to enable Scripting Capabilities with PowerShell 

Step 1: Download & Install Required Software

The following Softwares are is used to connect to your SharePoint Online via Powershell:


Download and Install SharePoint Online Management Shell

https://www.microsoft.com/en-us/download/details.aspx?id=35588


While installation, and if you get an error "This application requires the following to be installed: - PowerShell 3.0"


Then you have to Download and Install Windows Management Framework 5.0

https://www.microsoft.com/en-us/download/details.aspx?id=50395


Step 2: Open SharePoint Online Management Shell

Open SharePoint Online Management Shell



Step 3: Connect to your SharePoint Admin Portal

Type the following command to open connection: 

Connect-SPOService


Hit Enter


Enter the Url for your SharePoint Admin Portal (not your site, not yet)


Url: https://your-domain-admin.sharepoint.com

Replace with your domain



Hit Enter


Sign in

It will ask you for username and password for the user who has permission to manage SharePoint from SharePoint Admin Center.




Step 4: Enable Scripting Capabilities on your site

Type the following command that will enable scripting capabilities on your modern site and any other site:


Set-SPOsite https://your-domain.sharepoint.com/sites/modern-site -DenyAddAndCustomizePages 0

Replace with your domain

Replace with the path of your modern site



Hit Enter


That's it. You can now install ShortPoint on Modern Sites or any other site