Skip to main content
Copy Planner Plan
Updated this week

Command

Copy-PlannerPlan

Description

The command to copy plans from a Microsoft 365 group to another Microsoft 365 group. The destination group can be on the same or a different tenant.

Index

Examples

Copy a plan

$sourceTenant = Connect-Tenant -Domain tenantDomain
$sourceGroup = Get-Microsoft365Group -Name "MyGroup" -Tenant $sourceTenant
$plan = Get-PlannerPlan -Name "MyPlan" -Group $sourceGroup
$destinationTenant = Connect-Tenant -Domain destinationDomain
$destinationGroup = Get-Microsoft365Group -Name "DestinationGroup" -Tenant $destinationTenant
Copy-PlannerPlan -PlannerPlans $plan -DestinationGroup $destinationGroup

Copy multiple plans

$sourceTenant = Connect-Tenant -Domain tenantDomain
$sourceGroup = Get-Microsoft365Group -Name "MyGroup" -Tenant $sourceTenant
$plans = Get-PlannerPlan -Name "MyPlan", "MyPlan2", "MyPlan3" -Group $sourceGroup -AllowMultiple
$destinationTenant = Connect-Tenant -Domain destinationDomain
$destinationGroup = Get-Microsoft365Group -Name "DestinationGroup" -Tenant $destinationTenant
Copy-PlannerPlan -PlannerPlans $plans -DestinationGroup $destinationGroup

Copy all plans from a group

$sourceTenant = Connect-Tenant -Domain tenantDomain
$sourceGroup = Get-Microsoft365Group -Name "MyGroup" -Tenant $sourceTenant
$plans = Get-PlannerPlan -Name "*" -Group $sourceGroup -AllowMultiple
$destinationTenant = Connect-Tenant -Domain destinationDomain
$destinationGroup = Get-Microsoft365Group -Name "DestinationGroup" -Tenant $destinationTenant
Copy-PlannerPlan -PlannerPlans $plans -DestinationGroup $destinationGroup

Copy a plan with options

$sourceTenant = Connect-Tenant -Domain tenantDomain
$sourceGroup = Get-Microsoft365Group -Name "MyGroup" -Tenant $sourceTenant
$plan = Get-PlannerPlan -Name "MyPlan" -Group $sourceGroup
$destinationTenant = Connect-Tenant -Domain destinationDomain
$destinationGroup = Get-Microsoft365Group -Name "DestinationGroup" -Tenant $destinationTenant
$options = New-PlannerCopyOptions -CopyScope OnlyBuckets -IncludeMembership
Copy-PlannerPlan -PlannerPlans $plan -DestinationGroup $destinationGroup

Syntax

Copy-PlannerPlan-PlannerPlans <PlannerPlan[]>-DestinationGroup <Microsoft365Group>[-CopyOptions <PlannerCopyOptions>][-NormalMode <SwitchParameter>][-MappingSettings <MappingSettings>][-TaskName <String>]

You can get the syntax of any command in PowerShell with this script:

Get-Command Copy-Site -SyntaxParameters

Parameters

-CopyOptions <PlannerCopyOptions>

Specifies the copy options (scope of copy).

Required?

False

Default value

None

Accept pipeline input?

False

Accept wildcard characters?

False

Parameter set name

(All)

Aliases

None

-DestinationGroup <Microsoft365Group>

Specifies the destination M365 Group.

Required?

True

Default value

None

Accept pipeline input?

False

Accept wildcard characters?

False

Parameter set name

(All)

Aliases

None

-MappingSettings <MappingSettings>

Specifies the mapping settings.

Required?

False

Default value

None

Accept pipeline input?

False

Accept wildcard characters?

False

Parameter set name

(All)

Aliases

None

-NormalMode <SwitchParameter>

Specifies that the normal mode should be used.

Note: Insane mode is always used by default in PowerShell.

Required?

False

Default value

None

Accept pipeline input?

False

Accept wildcard characters?

False

Parameter set name

(All)

Aliases

None

-PlannerPlans <PlannerPlan[]>

Specifies the Planner plans.

Required?

True

Default value

None

Accept pipeline input?

True (ByValue, ByPropertyName)

Accept wildcard characters?

False

Parameter set name

(All)

Aliases

None

-TaskName <String>

Specifies a name for the task.

Required?

False

Default value

None

Accept pipeline input?

False

Accept wildcard characters?

False

Parameter set name

(All)

Aliases

None

Did this answer your question?