Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions sharepoint/sharepoint-ps/sharepoint-online/Set-SPOTenant.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ Set-SPOTenant [-ApplyAppEnforcedRestrictionsToAdHocRecipients <Boolean>]
[-AllowAnonymousMeetingParticipantsToAccessWhiteboards <SharingState>]
[-LabelMismatchEmailHelpLink <String>]
[-DisableBackToClassic <Boolean>]
[-DelayDenyAddAndCustomizePagesEnforcement <Boolean>]
[<CommonParameters>]
```

Expand Down Expand Up @@ -2428,6 +2429,31 @@ Accept pipeline input: False
Accept wildcard characters: False
```

### -DelayDenyAddAndCustomizePagesEnforcement
This parameter controls how SharePoint will deal with sites where custom scripts are allowed.

The valid values are:

* False (default) - for site collections where administrators enabled the ability to add custom script, SharePoint will revoke that ability within 24 hours from the last time this setting was changed.
* True - All changes performed by administrators to custom script settings are preserved. When the value is set to true, a banner shows in the active sites list of the SharePoint tenant admin center informing that changes to custom scripts are permanent.

> [!NOTE]
> This setting affects all sites. There are no options to preserve changes to custom script settings only on some specific sites. This parameter will be available until May 2024. After that time, administrators can still allow custom scripts on specific sites, but that change will be revoked automatically after up to 24 hours.

For more information, see [Allow or prevent custom script](https://learn.microsoft.com/en-us/sharepoint/allow-or-prevent-custom-script)

```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Applicable: SharePoint Online
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```

## RELATED LINKS

[Getting started with SharePoint Online Management Shell](/powershell/sharepoint/sharepoint-online/connect-sharepoint-online)
Expand Down