logo
search
Others

Fix SharePoint DelayDenyAddAndCustomizePagesEnforcement Parameter Error

Huda QurayshiHuda Qurayshi Sep 28, 2026 869 views

Question details

SharePoint administrators are encountering an error where the DelayDenyAddAndCustomizePagesEnforcement parameter cannot be found in PowerShell, and they need clarification on custom script settings persistence.

How to Fix the SharePoint DelayDenyAddAndCustomizePagesEnforcement Parameter Error
Product
SharePoint Online
Device & OS
not provided
Scenario
Administrators attempting to delay the enforcement of custom script blocks in SharePoint using the Set-SPOTenant PowerShell command.
Observed behavior
Running the command returns a 'parameter cannot be found' error. Additionally, there is uncertainty regarding whether the setting persists after the documented availability period of November 2024.
Before you start

Ensure you are running PowerShell as an administrator and check that your SharePoint Online Management Shell is fully up to date before executing tenant-level commands.

Solution 1Recommended

Update the SharePoint Online Management Shell

Outdated management shells often lack newly introduced parameters or fail to recognize specific Microsoft 365 tenant commands.

If you receive the error 'A parameter cannot be found that matches parameter name', the first step is to verify and update your PowerShell module. Microsoft frequently updates the module to support new administrative features.

1
Open PowerShell

Right-click the Start button and select 'Windows PowerShell (Admin)' or 'Terminal (Admin)' to run it with elevated privileges.

2
Uninstall outdated modules

Run the command 'Uninstall-Module -Name Microsoft.Online.SharePoint.PowerShell -AllVersions -Force' to remove any old, conflicting versions.

3
Install the latest version

Execute 'Install-Module -Name Microsoft.Online.SharePoint.PowerShell -Force' to install the most recent release from the PowerShell Gallery.

4
Reconnect and test

Run 'Connect-SPOService -Url https://[yourtenant]-admin.sharepoint.com' and attempt your Set-SPOTenant command again.

Update the SharePoint Online Management Shell
Parameter Availability: If the parameter is still missing after updating, Microsoft may have officially retired the feature as part of their custom script enforcement timeline.
Free Microsoft Office alternative

Switch to WPS Office for a Streamlined Document Experience

While SharePoint and Microsoft 365 handle complex enterprise tenant settings, WPS Office provides a free, lightweight, and highly compatible alternative for everyday document creation and editing without complicated administrative overhead.

  1. 1. Download WPS Office: Visit the official WPS website and download the free installation package for your operating system.
  2. 2. Install the Suite: Run the installer and follow the simple on-screen instructions to set up WPS Office on your computer.
  3. 3. Open and Edit Files: Launch WPS Office to easily open, edit, and save Word, Excel, and PowerPoint documents without complicated setups.
Fully compatible with Microsoft Office formats (Word, Excel, PowerPoint)Lightweight installation with blazing-fast startup timesNo complex PowerShell administration required for basic document managementFree to use with a familiar, easy-to-learn user interface
microsoft office alternative - wps office

Frequently Asked Questions

Why does PowerShell say the DelayDenyAddAndCustomizePagesEnforcement parameter cannot be found?

This error typically occurs if your SharePoint Online Management Shell is outdated. However, it can also happen if Microsoft has deprecated the parameter in your tenant environment as part of their rolling updates to custom script enforcement.

What is the DelayDenyAddAndCustomizePagesEnforcement setting used for?

This parameter was provided by Microsoft to allow administrators to delay the automatic enforcement that blocks custom scripts on specific SharePoint Online sites, giving organizations more time to adapt to new security policies.

Will my SharePoint custom script settings persist after November 2024?

The official Microsoft documentation is currently ambiguous regarding the exact post-November 2024 behavior. Administrators are advised to contact Microsoft 365 support directly through the admin center for a definitive answer tailored to their specific tenant.