diff --git a/CHANGELOG.md b/CHANGELOG.md index f87940108..fc35fed88 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -41,6 +41,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). - Added `-IncludeDeprecated` parameter to `Get-PnPTerm` cmdlet to fetch deprecated terms if specified [#1903](https://github.com/pnp/powershell/pull/1903) - Added `-IncludeContentType` parameter, which if specified will retrieve content type information of the list items. [#1921](https://github.com/pnp/powershell/pull/1921) - Added optional `-ValidateConnection` to `Connect-PnPOnline` which will check if the site you are connecting to exists and if not, will throw an exception [#1924](https://github.com/pnp/powershell/pull/1924) +- Added `AllowTenantMoveWithDataMigration` to `Get-PnPPlannerConfiguration` and `Set-PnPPlannerConfiguration` [#1934](https://github.com/pnp/powershell/pull/1934) - Added `Add-PnPListItemAttachment` cmdlet to provide ability to upload a file as an attachment to a SharePoint list item. [#1932](https://github.com/pnp/powershell/pull/1932) - Added `Remove-PnPListItemAttachment` cmdlet to provide ability to delete a list item attachment. [#1932](https://github.com/pnp/powershell/pull/1932) - Added `Get-PnPListItemAttachment` cmdlet to download the attachments from a list item. [#1932](https://github.com/pnp/powershell/pull/1932) diff --git a/documentation/Set-PnPPlannerConfiguration.md b/documentation/Set-PnPPlannerConfiguration.md index eb38f98d1..ea040e417 100644 --- a/documentation/Set-PnPPlannerConfiguration.md +++ b/documentation/Set-PnPPlannerConfiguration.md @@ -18,7 +18,7 @@ Allows the Microsoft Planner configuration of the tenant to be set ## SYNTAX ``` -Set-PnPPlannerConfiguration [-IsPlannerAllowed ] [-AllowRosterCreation ] [-AllowTenantMoveWithDataLoss ] [-AllowPlannerMobilePushNotifications ] [-AllowCalendarSharing ] [-Connection ] [] +Set-PnPPlannerConfiguration [-IsPlannerAllowed ] [-AllowRosterCreation ] [-AllowTenantMoveWithDataLoss ] [-AllowTenantMoveWithDataMigration ] [-AllowPlannerMobilePushNotifications ] [-AllowCalendarSharing ] [-Connection ] [] ``` ## DESCRIPTION @@ -79,6 +79,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -AllowTenantMoveWithDataMigration +Allows configuring whether a tenant move with data migration is authorized + +```yaml +Type: Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -AllowPlannerMobilePushNotifications Allows configuring whether the direct push notifications are enabled where contents of the push notification are being sent directly through Apple's or Google's services to get to the iOS or Android client diff --git a/src/Commands/Model/Planner/PlannerTenantConfig.cs b/src/Commands/Model/Planner/PlannerTenantConfig.cs index a549b6964..47231eb0a 100644 --- a/src/Commands/Model/Planner/PlannerTenantConfig.cs +++ b/src/Commands/Model/Planner/PlannerTenantConfig.cs @@ -25,6 +25,12 @@ public class PlannerTenantConfig [JsonPropertyName("allowTenantMoveWithDataLoss")] public bool? AllowTenantMoveWithDataLoss { get; set; } + /// + /// Indicates whether a tenant move with data migration is authorized. + /// + [JsonPropertyName("allowTenantMoveWithDataMigration")] + public bool? AllowTenantMoveWithDataMigration { get; set; } + /// /// Indicates whether the creation of Roster containers (Planner plans without Microsoft 365 Groups) is allowed /// diff --git a/src/Commands/Planner/GetPlannerConfiguration.cs b/src/Commands/Planner/GetPlannerConfiguration.cs index 811f6f075..81c338e4f 100644 --- a/src/Commands/Planner/GetPlannerConfiguration.cs +++ b/src/Commands/Planner/GetPlannerConfiguration.cs @@ -1,9 +1,9 @@ -using PnP.PowerShell.Commands.Attributes; +using System.Management.Automation; +using PnP.PowerShell.Commands.Attributes; using PnP.PowerShell.Commands.Base; using PnP.PowerShell.Commands.Utilities; -using System.Management.Automation; -namespace PnP.PowerShell.Commands.PowerPlatform.PowerAutomate +namespace PnP.PowerShell.Commands.Planner { [Cmdlet(VerbsCommon.Get, "PnPPlannerConfiguration")] [RequiredMinimalApiPermissions("https://tasks.office.com/.default")] diff --git a/src/Commands/Planner/SetPlannerConfiguration.cs b/src/Commands/Planner/SetPlannerConfiguration.cs index 1c15b868a..cff2e758c 100644 --- a/src/Commands/Planner/SetPlannerConfiguration.cs +++ b/src/Commands/Planner/SetPlannerConfiguration.cs @@ -3,7 +3,7 @@ using PnP.PowerShell.Commands.Utilities; using System.Management.Automation; -namespace PnP.PowerShell.Commands.PowerPlatform.PowerAutomate +namespace PnP.PowerShell.Commands.Planner { [Cmdlet(VerbsCommon.Set, "PnPPlannerConfiguration")] [RequiredMinimalApiPermissions("https://tasks.office.com/.default")] @@ -18,6 +18,9 @@ public class SetPlannerConfiguration : PnPGraphCmdlet [Parameter(Mandatory = false)] public bool? AllowTenantMoveWithDataLoss; + [Parameter(Mandatory = false)] + public bool? AllowTenantMoveWithDataMigration; + [Parameter(Mandatory = false)] public bool? AllowPlannerMobilePushNotifications; @@ -26,7 +29,7 @@ public class SetPlannerConfiguration : PnPGraphCmdlet protected override void ExecuteCmdlet() { - var result = PlannerUtility.SetPlannerConfigAsync(HttpClient, AccessToken, IsPlannerAllowed, AllowCalendarSharing, AllowTenantMoveWithDataLoss, AllowRosterCreation, AllowPlannerMobilePushNotifications).GetAwaiter().GetResult(); + var result = PlannerUtility.SetPlannerConfigAsync(HttpClient, AccessToken, IsPlannerAllowed, AllowCalendarSharing, AllowTenantMoveWithDataLoss, AllowTenantMoveWithDataMigration, AllowRosterCreation, AllowPlannerMobilePushNotifications).GetAwaiter().GetResult(); WriteObject(result); } } diff --git a/src/Commands/Utilities/PlannerUtility.cs b/src/Commands/Utilities/PlannerUtility.cs index e0d8d4f6e..b10c8ea2f 100644 --- a/src/Commands/Utilities/PlannerUtility.cs +++ b/src/Commands/Utilities/PlannerUtility.cs @@ -322,13 +322,14 @@ public static async Task GetPlannerConfigAsync(HttpClient h /// HttpClient instance to use to send out requests /// AccessToken to use to authenticate the request /// PlannerTenantConfig - public static async Task SetPlannerConfigAsync(HttpClient httpClient, string accessToken, bool? isPlannerAllowed, bool? allowCalendarSharing, bool? allowTenantMoveWithDataLoss, bool? allowRosterCreation, bool? allowPlannerMobilePushNotifications) + public static async Task SetPlannerConfigAsync(HttpClient httpClient, string accessToken, bool? isPlannerAllowed, bool? allowCalendarSharing, bool? allowTenantMoveWithDataLoss, bool? allowTenantMoveWithDataMigration, bool? allowRosterCreation, bool? allowPlannerMobilePushNotifications) { var content = new PlannerTenantConfig { IsPlannerAllowed = isPlannerAllowed, AllowCalendarSharing = allowCalendarSharing, AllowTenantMoveWithDataLoss = allowTenantMoveWithDataLoss, + AllowTenantMoveWithDataMigration = allowTenantMoveWithDataMigration, AllowRosterCreation = allowRosterCreation, AllowPlannerMobilePushNotifications = allowPlannerMobilePushNotifications };