From fa325d072d7532ee84b040c9be216080e7cb93ad Mon Sep 17 00:00:00 2001 From: Gautam Sheth Date: Fri, 20 Dec 2024 19:02:09 +0200 Subject: [PATCH] Remove deprecated parameters from Set-PnPTenant cmdlet --- CHANGELOG.md | 2 ++ documentation/Set-PnPTenant.md | 34 --------------------------------- src/Commands/Admin/SetTenant.cs | 17 +---------------- src/Commands/Model/SPOTenant.cs | 6 +----- 4 files changed, 4 insertions(+), 55 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 36d00586c..541510c8b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -119,6 +119,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). - Removed `Set-PnPMinimalDownloadStrategy` as it's not applicable anymore to SharePoint Online. If you need the functionality you can always turn on the feature with `Enable-PnPFeature -Id 87294c72-f260-42f3-a41b-981a2ffce37a` or turn it off with `Disable-PnPFeature -Id 87294c72-f260-42f3-a41b-981a2ffce37a` - Removed `-SPOManagementShell` parameter from `Connect-PnPOnline` cmdlet. It reduces the risk of changes coming from Microsoft. Use your own Entra ID app instead. - Removed `Set-PnPTraceLog` cmdlet and introduced `Start-PnPTraceLog` and `Stop-PnPTraceLog` with similar parameters. +- Removed `-DelayDenyAddAndCustomizePagesEnforcement` parameter from `Set-PnPTenant` cmdlet as it is no longer valid , removed from underlying SDK and its value can't be changed. +- Removed `-EnableVersionExpirationSetting` parameter from `Set-PnPTenant` cmdlet as it is now enabled by default. ### Contributors diff --git a/documentation/Set-PnPTenant.md b/documentation/Set-PnPTenant.md index 457d1539e..bcb597324 100644 --- a/documentation/Set-PnPTenant.md +++ b/documentation/Set-PnPTenant.md @@ -138,7 +138,6 @@ Set-PnPTenant [-SpecialCharactersStateInFileFolderNames [-EnableSensitivityLabelForPDF ] [-IsDataAccessInCardDesignerEnabled ] [-CoreSharingCapability ] - [-EnableVersionExpirationSetting ] [-BlockUserInfoVisibilityInOneDrive ] [-AllowOverrideForBlockUserInfoVisibility ] [-AllowEveryoneExceptExternalUsersClaimInPrivateSite ] @@ -159,7 +158,6 @@ Set-PnPTenant [-SpecialCharactersStateInFileFolderNames [-CoreDefaultShareLinkRole ] [-GuestSharingGroupAllowListInTenantByPrincipalIdentity ] [-OneDriveSharingCapability ] - [-DelayDenyAddAndCustomizePagesEnforcement ] [-AllowWebPropertyBagUpdateWhenDenyAddAndCustomizePagesIsEnabled ] [-SelfServiceSiteCreationDisabled ] [-SyncAadB2BManagementPolicy] @@ -455,25 +453,6 @@ 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. - -```yaml -Type: Boolean -Parameter Sets: (All) - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -DisableBackToClassic Disables the back to classic link for libraries and lists. @@ -2482,19 +2461,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -EnableVersionExpirationSetting -Sets intelligent version deleting options and default organization limits. - -```yaml -Type: Boolean -Parameter Sets: (All) -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -BlockUserInfoVisibilityInOneDrive Blocks users from accessing User Info if they have Limited Access permission only to the OneDrive. The policy applies to all OneDrives in the organization. diff --git a/src/Commands/Admin/SetTenant.cs b/src/Commands/Admin/SetTenant.cs index a37de4d74..35c9f680a 100644 --- a/src/Commands/Admin/SetTenant.cs +++ b/src/Commands/Admin/SetTenant.cs @@ -414,15 +414,9 @@ public class SetTenant : PnPAdminCmdlet [Parameter(Mandatory = false)] public InformationBarriersMode? DefaultOneDriveInformationBarrierMode { get; set; } - [Parameter(Mandatory = false)] - public bool? DelayDenyAddAndCustomizePagesEnforcement { get; set; } - [Parameter(Mandatory = false)] public SharingCapabilities? CoreSharingCapability { get; set; } - [Parameter(Mandatory = false)] - public bool? EnableVersionExpirationSetting { get; set; } - [Parameter(Mandatory = false)] public TenantBrowseUserInfoPolicyValue? BlockUserInfoVisibilityInOneDrive; @@ -1447,21 +1441,12 @@ protected override void ExecuteCmdlet() modified = true; } - if (DelayDenyAddAndCustomizePagesEnforcement.HasValue) - { - Tenant.DelayDenyAddAndCustomizePagesEnforcement = DelayDenyAddAndCustomizePagesEnforcement.Value; - modified = true; - } if (CoreSharingCapability.HasValue) { Tenant.CoreSharingCapability = CoreSharingCapability.Value; modified = true; } - if (EnableVersionExpirationSetting.HasValue) - { - Tenant.EnableVersionExpirationSetting = EnableVersionExpirationSetting.Value; - modified = true; - } + if (BlockUserInfoVisibilityInOneDrive.HasValue) { Tenant.BlockUserInfoVisibilityInOneDrive = BlockUserInfoVisibilityInOneDrive.Value; diff --git a/src/Commands/Model/SPOTenant.cs b/src/Commands/Model/SPOTenant.cs index 71fb68495..70fbe7e97 100644 --- a/src/Commands/Model/SPOTenant.cs +++ b/src/Commands/Model/SPOTenant.cs @@ -197,8 +197,6 @@ public class SPOTenant public SharingCapabilities? CoreSharingCapability { private set; get; } - public bool? EnableVersionExpirationSetting { private set; get; } - public TenantBrowseUserInfoPolicyValue? BlockUserInfoVisibilityInOneDrive { private set; get; } public bool? AllowOverrideForBlockUserInfoVisibility { private set; get; } @@ -744,7 +742,6 @@ public SPOTenant(Tenant tenant, ClientContext clientContext) try { AppBypassInformationBarriers = tenant.AppBypassInformationBarriers; } catch { } try { if (tenant.DefaultODBMode != null) DefaultOneDriveInformationBarrierMode = Enum.Parse(tenant.DefaultODBMode); } catch { } try { CoreSharingCapability = tenant.CoreSharingCapability; } catch { } - try { EnableVersionExpirationSetting = tenant.EnableVersionExpirationSetting; } catch { } try { BlockUserInfoVisibilityInOneDrive = tenant.BlockUserInfoVisibilityInOneDrive; } catch { } try { AllowOverrideForBlockUserInfoVisibility = tenant.AllowOverrideForBlockUserInfoVisibility; } catch { } try { AllowEveryoneExceptExternalUsersClaimInPrivateSite = tenant.AllowEveryoneExceptExternalUsersClaimInPrivateSite; } catch { } @@ -767,7 +764,7 @@ public SPOTenant(Tenant tenant, ClientContext clientContext) try { OneDriveDefaultLinkToExistingAccess = tenant.OneDriveDefaultLinkToExistingAccess; } catch { } try { OneDriveBlockGuestsAsSiteAdmin = tenant.OneDriveBlockGuestsAsSiteAdmin; } catch { } try { RecycleBinRetentionPeriod = tenant.RecycleBinRetentionPeriod; } catch { } - try { EnableAIPIntegration = tenant.EnableAIPIntegration; } catch { } + try { EnableAIPIntegration = tenant.EnableAIPIntegration; } catch { } try { CoreDefaultShareLinkScope = tenant.CoreDefaultShareLinkScope; } catch { } try { CoreDefaultShareLinkRole = tenant.CoreDefaultShareLinkRole; } catch { } try { SharePointAddInsDisabled = tenant.SharePointAddInsDisabled; } catch { } @@ -778,4 +775,3 @@ public SPOTenant(Tenant tenant, ClientContext clientContext) } } } - \ No newline at end of file