In order to install ShortPoint SPFx for both modern and classic SharePoint pages, you must first enable Scripting Capabilities with PowerShell. By default, scripting capabilities are not enabled with classic sites. The only way to enable scripting capabilities on modern sites is using PowerShell.
NOTEStarting November 2024, Microsoft will make it very hard to keep Scripting Capabilities enabled on SharePoint Sites. They are currently automatically disabling Scripting Capabilities every 24 hours unless you run the command outlined here under Persist custom script settings. However, starting November 2024, this command will no longer work, which means that you will need to manually run a script daily to enable scripting capabilities. We highly recommend migrating your SharePoint Environment from Classic Sites and Pages to Modern Sites and Pages. You may reach out to our support team for recommendations on how to do this. You can contact us by sending an email to support@shortpoint.com or by submitting a ticket.
We also recommend migrating off of SharePoint add-ins that require Scripting Capabilities to function. Note that ShortPoint doesn't require Scripting Capabilities to run on Modern Sites and Pages.
NOTEStarting March 2024, Microsoft will remove the ability to enable scripting capabilities in the SharePoint admin center.
Users can still enable this option through PowerShell but migrating off Classsic Pages and Sites is highly recommended. Please read the note above.
Short walkthrough for advanced users:
- Login to your SharePoint 2019 Farm Server.
- Open SharePoint 2019 Management Shell as administrator.
- Execute the following PowerShell command:
(Get-SPSite -Identity "https://your-host/sites/modern-site").DenyPermissionsMask = [Microsoft.SharePoint.SPBasePermissions]::EmptyMask
Replace your-host with your hostname.
Replace modern-site with the path of your modern site.
For example:
(Get-SPSite-Identity"https://shortpoint2019/sites/portal").DenyPermissionsMask=[Microsoft.SharePoint.SPBasePermissions]::EmptyMask
4. Persist custom script settings by running the command below in PowerShell:
Set-SPOTenant -DelayDenyAddAndCustomizePagesEnforcement $True
Once done, you can proceed to enable IIS 6 Metabase Compatibility.
TABLE OF CONTENTS
This article is for you if
- You are running the ShortPoint SPFx package on SharePoint 2019 Farm Server.
- You have faced this issue while running ShortPoint Installation.
- You want to enable scripting capabilities on modern sites (only required if you're going to use ShortPoint on classic pages)
- You want to enable scripting capabilities on group sites (only required if you're going to use ShortPoint on classic pages)
- You want to enable scripting capabilities on a specific SharePoint 2019 On-Premise site only.
- You have Farm Server Administrator access.
How to enable Scripting Capabilities with PowerShell
Follow the steps below to enable Scripting Capabilities with PowerShell.
Step 1: Open SharePoint 2019 Management Shell
First, use the Windows search box to look for SharePoint 2019 Management Shell. Right-click on the app and select Run as administrator.
A pop-up window will appear asking you if you want to allow the app to make changes to your device. Click Yes.
You will be redirected to Administrator: SharePoint 2019 Management Shell.
Step 2: Enable Scripting Capabilities on your site
Type the command below to enable scripting capabilities:
(Get-SPSite -Identity "https://your-host/sites/modern-site").DenyPermissionsMask = [Microsoft.SharePoint.SPBasePermissions]::EmptyMask
Replace your-host with your hostname.
Replace modern-site with the path of your modern site.
For example:
(Get-SPSite-Identity"https://shortpoint2019/sites/portal").DenyPermissionsMask=[Microsoft.SharePoint.SPBasePermissions]::EmptyMask
After typing this command, hit Enter using your keyboard.
Step 3: Persist custom script settings
To prevent SharePoint from resetting custom script settings to its original value, run the following command in PowerShell:
Set-SPOTenant -DelayDenyAddAndCustomizePagesEnforcement $True
NOTEStarting November 2024, this command will stop working as outlined in the Pesist custom script section.For this reason, we highly recommend moving your pages from Classic Sites and Pages to Modern Sites and pages to avoid disruption. We also recommend to stop relying on add-ins that require scripting capabilities to be enabled to run. ShortPoint does not need Scripting Capabilities to run on Modern Sites and Pages.
That’s it! You now have scripting capabilities enabled. Go ahead and continue to do Prerequisite 3: Enable IIS 6 Metabase Compatibility (SharePoint 2019).
Related Articles:
- ShortPoint SPFx Installation for SharePoint 2019 (First Time)
- Prerequisite 1: Setup SharePoint 2019 Farm App Catalog (SPFx)
- Prerequisite 2: Enable Scripting Capabilities with PowerShell (SharePoint 2019)
- Prerequisite 3: Enable IIS 6 Metabase Compatibility (SharePoint 2019)
- Installation Step 1: Upload ShortPoint SPFx to App Catalog (SharePoint 2019)
- Installation Step 2: Add ShortPoint SPFx to Site Contents (SharePoint 2019)
- Installation Step 3: Run ShortPoint SPFx Installation from Dashboard (SharePoint 2019)
- What Is "Scripting Capabilities" and Why Is It Required for Using ShortPoint on Classic Pages?