diff --git a/documentation/Set-PnPTenant.md b/documentation/Set-PnPTenant.md index 1642c6f02..f72dd275b 100644 --- a/documentation/Set-PnPTenant.md +++ b/documentation/Set-PnPTenant.md @@ -3022,6 +3022,44 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -AllowClassicPublishingSiteCreation +This parameter allows creation of classic publishing site collections (templates `BLANKINTERNETCONTAINER#0, CMSPUBLISHING#0 and BLANKINTERNET#0`) and activation of classic publishing features in sites. + +The valid values are: + +- False (default) - Classic publishing site collections cannot be created and the publishing features cannot be activated in sites. +- True - Classic publishing site collections can be created and the publishing features can be activated in sites. + +```yaml +Type: Boolean +Parameter Sets: (All) + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DelayDenyAddAndCustomizePagesEnforcementOnClassicPublishingSites +This parameter controls how SharePoint will deal with classic publishing sites (templates `BLANKINTERNETCONTAINER#0, CMSPUBLISHING#0 and BLANKINTERNET#0`) where custom scripts are allowed. + +The valid values are: + +- False (default) - for classic publishing 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. + +```yaml +Type: Boolean +Parameter Sets: (All) + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Force If provided, no confirmation will be requested and the action will be performed diff --git a/src/Commands/Admin/SetTenant.cs b/src/Commands/Admin/SetTenant.cs index 7145cbf64..34da0624a 100644 --- a/src/Commands/Admin/SetTenant.cs +++ b/src/Commands/Admin/SetTenant.cs @@ -489,39 +489,45 @@ public class SetTenant : PnPSharePointOnlineAdminCmdlet [Parameter(Mandatory = false)] public string WhoCanShareAllowListInTenant { private set; get; } - [Parameter(Mandatory = false)] + [Parameter(Mandatory = false)] public bool? LegacyBrowserAuthProtocolsEnabled { private set; get; } - [Parameter(Mandatory = false)] + [Parameter(Mandatory = false)] public bool? EnableDiscoverableByOrganizationForVideos { private set; get; } - [Parameter(Mandatory = false)] + [Parameter(Mandatory = false)] public string RestrictedAccessControlforSitesErrorHelpLink { private set; get; } - [Parameter(Mandatory = false)] + [Parameter(Mandatory = false)] public bool? Workflow2010Disabled { private set; get; } - [Parameter(Mandatory = false)] + [Parameter(Mandatory = false)] public bool? AllowSharingOutsideRestrictedAccessControlGroups { private set; get; } - [Parameter(Mandatory = false)] + [Parameter(Mandatory = false)] public bool? HideSyncButtonOnDocLib { private set; get; } - [Parameter(Mandatory = false)] + [Parameter(Mandatory = false)] public bool? HideSyncButtonOnODB { private set; get; } - [Parameter(Mandatory = false)] + [Parameter(Mandatory = false)] public int? StreamLaunchConfig { private set; get; } - [Parameter(Mandatory = false)] + [Parameter(Mandatory = false)] public bool? EnableMediaReactions { private set; get; } - [Parameter(Mandatory = false)] + [Parameter(Mandatory = false)] public bool? ContentSecurityPolicyEnforcement { private set; get; } [Parameter(Mandatory = false)] public bool? DisableSpacesActivation { private set; get; } - + + [Parameter(Mandatory = false)] + public bool? AllowClassicPublishingSiteCreation { private set; get; } + + [Parameter(Mandatory = false)] + public bool? DelayDenyAddAndCustomizePagesEnforcementOnClassicPublishingSites { private set; get; } + protected override void ExecuteCmdlet() { AdminContext.Load(Tenant); @@ -1652,6 +1658,16 @@ protected override void ExecuteCmdlet() Tenant.DisableSpacesActivation = DisableSpacesActivation.Value; modified = true; } + if (AllowClassicPublishingSiteCreation.HasValue) + { + Tenant.AllowClassicPublishingSiteCreation = AllowClassicPublishingSiteCreation.Value; + modified = true; + } + if (DelayDenyAddAndCustomizePagesEnforcementOnClassicPublishingSites.HasValue) + { + Tenant.DelayDenyAddAndCustomizePagesEnforcementOnClassicPublishingSites = DelayDenyAddAndCustomizePagesEnforcementOnClassicPublishingSites.Value; + modified = true; + } if (GuestSharingGroupAllowListInTenantByPrincipalIdentity != null) { if (GuestSharingGroupAllowListInTenantByPrincipalIdentity.Length > 0)