How can we help you today?

Enable Scripting Capabilities with PowerShell for Office 365

If you are trying to install ShortPoint on your SharePoint site, and you came across an error message saying that you have to enable scripting capabilities to finish the installation, then this article is for you.


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 cannot install ShortPoint Add-In on modern sites if scripting capabilities are not enabled. The only way to enable scripting capabilities on modern sites is through SharePoint Online Management Shell or PowerShell



TABLE OF CONTENTS


Before we begin


Prerequisites


How to enable scripting capabilities with PowerShell


Please follow this step-by-step tutorial to enable scripting capabilities on your Office 365 SharePoint site.


Step 1: Open SharePoint Online Management Shell


From your computer, open SharePoint Online Management Shell.


Open SharePoint Online Management Shell



Note: If you do not have the SharePoint Online Management Shell application on your computer, kindly go back to the prerequisite guidelines to learn how to download and install it.

Step 2: Connect and sign in to your SharePoint Admin Portal


2.1 Connect to your SharePoint Admin Portal


On the SharePoint Online Manage Shell, type the following command to open connection: 


Connect-SPOService


Connect to your SharePoint site


Then, hit the Enter key.


2.2  Enter your SharePoint Admin Portal URL


Enter the URL for your SharePoint Admin Portal, which looks like: https:// your-domain -admin.sharepoint.com, where your-domain should be replaced with the name of your site domain.


Enter the URL for your SharePoint Admin Portal site


Then, hit the Enter key.


2.3 Sign in to your SharePoint account


If you are successful in connecting to your site, it will ask you for a username and password for the user who has permission to manage SharePoint from SharePoint Admin Center.


Sign in to you SharePoint account


Step 3: 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


where:

  • your-domain should be replaced with the name of your site domain.
  • sites/modern-site should be replaced with the path of your modern site.


Enabling scripting capabilities on your site


Then, hit the Enter key.


That's it! Once you have successfully followed the steps here, you will now be able to install ShortPoint on Modern Sites or any other site.


Disabling scripting capabilities on your site


In the event that you want to disable scripting capabilities on your site, you may repeat the steps in this article. However, for Step 3, replace the command with: 


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


where:

  • your-domain should be replaced with the name of your site domain.
  • sites/modern-site should be replaced with the path of your modern site.


Related articles:

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.

World's best intranet sites are designed using ShortPoint

Get started today! Learn more
See all 9 topics

Start a trial

Ignite your vision. Install ShortPoint directly on your site, or play in sandbox mode. No credit card required.

Get started today

World’s best intranet sites are designed using ShortPoint

Thousands of companies using ShortPoint everyday to design, brand and build award winning intranet sites.

Get started Learn more