Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deprecated parameters from Set-PnPTenant cmdlet #4645

Merged
merged 1 commit into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
34 changes: 0 additions & 34 deletions documentation/Set-PnPTenant.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ Set-PnPTenant [-SpecialCharactersStateInFileFolderNames <SpecialCharactersState>
[-EnableSensitivityLabelForPDF <Boolean>]
[-IsDataAccessInCardDesignerEnabled <Boolean>]
[-CoreSharingCapability <SharingCapabilities>]
[-EnableVersionExpirationSetting <Boolean>]
[-BlockUserInfoVisibilityInOneDrive <TenantBrowseUserInfoPolicyValue>]
[-AllowOverrideForBlockUserInfoVisibility <Boolean>]
[-AllowEveryoneExceptExternalUsersClaimInPrivateSite <Boolean>]
Expand All @@ -159,7 +158,6 @@ Set-PnPTenant [-SpecialCharactersStateInFileFolderNames <SpecialCharactersState>
[-CoreDefaultShareLinkRole <Role>]
[-GuestSharingGroupAllowListInTenantByPrincipalIdentity <string[]>]
[-OneDriveSharingCapability <SharingCapabilities>]
[-DelayDenyAddAndCustomizePagesEnforcement <Boolean>]
[-AllowWebPropertyBagUpdateWhenDenyAddAndCustomizePagesIsEnabled <Boolean>]
[-SelfServiceSiteCreationDisabled <Boolean>]
[-SyncAadB2BManagementPolicy]
Expand Down Expand Up @@ -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.

Expand Down Expand Up @@ -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.

Expand Down
17 changes: 1 addition & 16 deletions src/Commands/Admin/SetTenant.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;
Expand Down
6 changes: 1 addition & 5 deletions src/Commands/Model/SPOTenant.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down Expand Up @@ -744,7 +742,6 @@ public SPOTenant(Tenant tenant, ClientContext clientContext)
try { AppBypassInformationBarriers = tenant.AppBypassInformationBarriers; } catch { }
try { if (tenant.DefaultODBMode != null) DefaultOneDriveInformationBarrierMode = Enum.Parse<InformationBarriersMode>(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 { }
Expand All @@ -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 { }
Expand All @@ -778,4 +775,3 @@ public SPOTenant(Tenant tenant, ClientContext clientContext)
}
}
}

Loading