From 15c65d064e186b8d88c5215d1acff0b465aa3e97 Mon Sep 17 00:00:00 2001 From: Koen Zomers Date: Wed, 10 May 2023 14:46:40 +0200 Subject: [PATCH 1/2] Added `-ArchiveRedirectUrl` to `Set-PnPTenant` allowing the configuration of a custom page to be shown when navigating to an archived SharePoint Online site --- CHANGELOG.md | 1 + documentation/Set-PnPTenant.md | 15 +++++++++++++++ src/Commands/Admin/SetTenant.cs | 9 +++++++++ 3 files changed, 25 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3128c6a9b..23de670cb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). - Added `-SkipUrlValidation` to `Get-PnPSiteCollectionAppCatalog` which allows for skipping the URL validation when retrieving the site collection app catalog making it faster but potentially returning URLs that have been renamed [#2305](https://github.com/pnp/powershell/pull/3025) - Added `Get-PnPLargeListOperationStatus` cmdlet to retrieve the status of a large list operation. [#3033](https://github.com/pnp/powershell/pull/3033) - Added `-BlockDownloadPolicy`, `-ExcludeBlockDownloadPolicySiteOwners` and `ExcludedBlockDownloadGroupIds` parameters to `Set-PnPTenantSite` and `Set-PnPSite` cmdlets. [#3084](https://github.com/pnp/powershell/pull/3084) +- Added `-ArchiveRedirectUrl` to `Set-PnPTenant` allowing the configuration of a custom page to be shown when navigating to an archived SharePoint Online site ### Fixed diff --git a/documentation/Set-PnPTenant.md b/documentation/Set-PnPTenant.md index 3c5027ad1..476439fe7 100644 --- a/documentation/Set-PnPTenant.md +++ b/documentation/Set-PnPTenant.md @@ -119,6 +119,7 @@ Set-PnPTenant [-SpecialCharactersStateInFileFolderNames [-IBImplicitGroupBased ] [-ShowOpenInDesktopOptionForSyncedFiles ] [-ShowPeoplePickerGroupSuggestionsForIB ] + [-ArchiveRedirectUrl ] [-Force] [-Connection ] ``` @@ -201,6 +202,20 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ArchiveRedirectUrl +Can be used to configure a custom page to show when a user is navigating to a SharePoint Online site that has been archived using Microsoft Syntex Archiving. + +```yaml +Type: String +Parameter Sets: (All) + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -BccExternalSharingInvitations When the feature is enabled, all external sharing invitations that are sent will blind copy the e-mail messages listed in the BccExternalSharingInvitationsList. diff --git a/src/Commands/Admin/SetTenant.cs b/src/Commands/Admin/SetTenant.cs index d3e5b9080..ad6b65b48 100644 --- a/src/Commands/Admin/SetTenant.cs +++ b/src/Commands/Admin/SetTenant.cs @@ -352,6 +352,9 @@ public class SetTenant : PnPAdminCmdlet [Parameter(Mandatory = false)] public SwitchParameter Force; + [Parameter(Mandatory = false)] + public string ArchiveRedirectUrl { get; set; } + protected override void ExecuteCmdlet() { AdminContext.Load(Tenant); @@ -1209,6 +1212,12 @@ protected override void ExecuteCmdlet() modified = true; } + if (ShowPeoplePickerGroupSuggestionsForIB.HasValue) + { + Tenant.ArchiveRedirectUrl = ArchiveRedirectUrl; + modified = true; + } + if (modified) { AdminContext.ExecuteQueryRetry(); From df7c314fa38fb7ea64b89323e31aade763647671 Mon Sep 17 00:00:00 2001 From: Koen Zomers Date: Wed, 10 May 2023 14:48:00 +0200 Subject: [PATCH 2/2] Added PR reference --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 23de670cb..d6d770840 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,7 +18,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). - Added `-SkipUrlValidation` to `Get-PnPSiteCollectionAppCatalog` which allows for skipping the URL validation when retrieving the site collection app catalog making it faster but potentially returning URLs that have been renamed [#2305](https://github.com/pnp/powershell/pull/3025) - Added `Get-PnPLargeListOperationStatus` cmdlet to retrieve the status of a large list operation. [#3033](https://github.com/pnp/powershell/pull/3033) - Added `-BlockDownloadPolicy`, `-ExcludeBlockDownloadPolicySiteOwners` and `ExcludedBlockDownloadGroupIds` parameters to `Set-PnPTenantSite` and `Set-PnPSite` cmdlets. [#3084](https://github.com/pnp/powershell/pull/3084) -- Added `-ArchiveRedirectUrl` to `Set-PnPTenant` allowing the configuration of a custom page to be shown when navigating to an archived SharePoint Online site +- Added `-ArchiveRedirectUrl` to `Set-PnPTenant` allowing the configuration of a custom page to be shown when navigating to an archived SharePoint Online site [#3100](https://github.com/pnp/powershell/pull/3100) ### Fixed