From 8c05638868aa7340cd7a0cbba472a01dc899bcdc Mon Sep 17 00:00:00 2001 From: Gautam Sheth Date: Thu, 7 Mar 2024 13:56:33 +0200 Subject: [PATCH] Feature: added DelayDenyAddAndCustomizePagesEnforcement to Set-PnPTenant cmdlet --- CHANGELOG.md | 1 + src/Commands/Admin/SetTenant.cs | 31 ++++++++++++++++++++----------- 2 files changed, 21 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 81bc658a6..64f88706d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). - Added `Remove-PnPLibraryFileVersionBatchDeleteJob` and `Remove-PnPSiteFileVersionBatchDeleteJob` cmdlets to cancel the job for deleting file versions based on age. [#3799](https://github.com/pnp/powershell/pull/3799) - Added `Get-PnPLibraryFileVersionExpirationReportJobProgress` and `Get-PnPSiteFileVersionExpirationReportJobProgress` cmdlets to getting the progress for the job for file versions based on age. [#3799](https://github.com/pnp/powershell/pull/3799) - Added `-UseVersionExpirationReport` parameter to `Get-PnPFileVersion` cmdlet to get the version expiration report for a single file. [#3799](https://github.com/pnp/powershell/pull/3799) +- Added `-DelayDenyAddAndCustomizePagesEnforcement` parameter to `Set-PnPTenant` cmdlet which allows delay of the change to custom script set on the Tenant until mid-November 2024. ### Fixed diff --git a/src/Commands/Admin/SetTenant.cs b/src/Commands/Admin/SetTenant.cs index 50ba158bd..14d144e17 100644 --- a/src/Commands/Admin/SetTenant.cs +++ b/src/Commands/Admin/SetTenant.cs @@ -347,7 +347,7 @@ public class SetTenant : PnPAdminCmdlet public bool? ShowPeoplePickerGroupSuggestionsForIB { get; set; } [Parameter(Mandatory = false)] - public int? OneDriveRequestFilesLinkExpirationInDays { get; set; } + public int? OneDriveRequestFilesLinkExpirationInDays { get; set; } [Parameter(Mandatory = false)] public bool? BlockDownloadFileTypePolicy { get; set; } @@ -361,13 +361,13 @@ public class SetTenant : PnPAdminCmdlet public Guid[] ExcludedBlockDownloadGroupIds { get; set; } [Parameter(Mandatory = false)] - public SwitchParameter Force; + public SwitchParameter Force; [Parameter(Mandatory = false)] public string ArchiveRedirectUrl { get; set; } [Parameter(Mandatory = false)] - public bool? BlockSendLabelMismatchEmail { get; set; } + public bool? BlockSendLabelMismatchEmail { get; set; } [Parameter(Mandatory = false)] public MediaTranscriptionPolicyType? MediaTranscription { get; set; } @@ -380,13 +380,13 @@ public class SetTenant : PnPAdminCmdlet [Parameter(Mandatory = false)] public bool? ReduceTempTokenLifetimeEnabled { get; set; } - + [Parameter(Mandatory = false)] public int? ReduceTempTokenLifetimeValue; [Parameter(Mandatory = false)] public bool? ViewersCanCommentOnMediaDisabled { get; set; } - + [Parameter(Mandatory = false)] public bool? AllowGuestUserShareToUsersNotInSiteCollection { get; set; } @@ -412,10 +412,13 @@ public class SetTenant : PnPAdminCmdlet public bool? IsDataAccessInCardDesignerEnabled { get; set; } [Parameter(Mandatory = false)] - public bool? AppBypassInformationBarriers { get; set;} + public bool? AppBypassInformationBarriers { get; set; } + + [Parameter(Mandatory = false)] + public InformationBarriersMode? DefaultOneDriveInformationBarrierMode { get; set; } [Parameter(Mandatory = false)] - public InformationBarriersMode? DefaultOneDriveInformationBarrierMode { get; set;} + public bool? DelayDenyAddAndCustomizePagesEnforcement; protected override void ExecuteCmdlet() { @@ -1338,20 +1341,20 @@ protected override void ExecuteCmdlet() Tenant.AllowGuestUserShareToUsersNotInSiteCollection = AllowGuestUserShareToUsersNotInSiteCollection.Value; modified = true; } - + if (IncludeAtAGlanceInShareEmails.HasValue) { Tenant.IncludeAtAGlanceInShareEmails = IncludeAtAGlanceInShareEmails.Value; modified = true; } - + if (MassDeleteNotificationDisabled.HasValue) { Tenant.MassDeleteNotificationDisabled = MassDeleteNotificationDisabled.Value; modified = true; } - if(BusinessConnectivityServiceDisabled.HasValue) + if (BusinessConnectivityServiceDisabled.HasValue) { Tenant.BusinessConnectivityServiceDisabled = BusinessConnectivityServiceDisabled.Value; modified = true; @@ -1381,6 +1384,12 @@ protected override void ExecuteCmdlet() modified = true; } + if (DelayDenyAddAndCustomizePagesEnforcement.HasValue) + { + Tenant.DelayDenyAddAndCustomizePagesEnforcement = DelayDenyAddAndCustomizePagesEnforcement.Value; + modified = true; + } + if (BlockDownloadFileTypePolicy.HasValue) { if (!BlockDownloadFileTypePolicy.Value) @@ -1423,7 +1432,7 @@ protected override void ExecuteCmdlet() } Tenant.SetBlockDownloadFileTypePolicyExclusionList(ExcludedBlockDownloadGroupIds); modified = true; - } + } if (modified) {