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 is through PowerShell


NOTEStarting March 2024, Microsoft will remove the ability to enable scripting capabilities in the SharePoint admin center. 

Custom Script in Admin Center

However, users can still enable this option through PowerShell.


TABLE OF CONTENTS


Before we begin


Prerequisites


How to enable scripting capabilities with PowerShell


Follow the steps below 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


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


Connect-SPOService


Then, hit the Enter key.


Connect to your SharePoint site

Enter the URL of your SharePoint Admin Portal. Typically, the URL looks like this:


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


Replace your-domain with the name of your site domain and hit Enter.


Enter the URL for your SharePoint Admin Portal site

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


Sign in to you SharePoint account


Step 3: Enable scripting capabilities on your site


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


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


Replace

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


Enabling scripting capabilities on your site


Then, hit the Enter key.


That's it! You have now enabled scripting capabilities in Office 365. 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


Replace

  • your-domain  with the name of your site domain.
  • sites/modern-site 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 8 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