Fix SharePoint DelayDenyAddAndCustomizePagesEnforcement Parameter Error
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.

- 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.
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.
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.
Right-click the Start button and select 'Windows PowerShell (Admin)' or 'Terminal (Admin)' to run it with elevated privileges.
Run the command 'Uninstall-Module -Name Microsoft.Online.SharePoint.PowerShell -AllVersions -Force' to remove any old, conflicting versions.
Execute 'Install-Module -Name Microsoft.Online.SharePoint.PowerShell -Force' to install the most recent release from the PowerShell Gallery.
Run 'Connect-SPOService -Url https://[yourtenant]-admin.sharepoint.com' and attempt your Set-SPOTenant command again.

Consult Microsoft 365 Support for Deprecated Features
If the parameter has been officially removed or you need clarification on post-November 2024 behavior, official support is required.
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. Download WPS Office: Visit the official WPS website and download the free installation package for your operating system.
- 2. Install the Suite: Run the installer and follow the simple on-screen instructions to set up WPS Office on your computer.
- 3. Open and Edit Files: Launch WPS Office to easily open, edit, and save Word, Excel, and PowerPoint documents without complicated setups.

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.




