Apply-PnPProvisioningTemplate: Teams Site Planner is merely a link, not a copy

Jurgen Verhelst 326 Reputation points
2021-01-01T03:20:44.287+00:00

Hi,

I made a template of a o365 team site with a planner in it

after applying that template to a new site collection I do see that plan but its not a copy but achtually the data from the source site.

  1. I know I can copy the plan via tasks.office.com to the new site once it is linked to teams, but was hoping for a powershell way.
  2. I want to remove the links from the template. is there a switch in get-pnpProvisioningtemplate to not take the link to planner?

the long way around would be to go to tasks.office.com, open the plan, export to excel, then use Sandy Zhen's powershell for planner to recreate each task and bucket (.

$responde3 = New-PlannerTask -PlanID $PlannerPlanID -TaskName $TaskName -BucketID $PlannerPlanBucketID -startDate "2019.6.3" -dueDate "2019.6.30"
$PlannerPlanTaskID = $responde3.id

Powershell for planner: powershell-module-for-microsoft-planner

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,669 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
9,702 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Amos Wu-MSFT 4,051 Reputation points
    2021-01-01T07:15:46.35+00:00

    The get-PnPProvisioningTemplate cmdlet has a Configuration Parameters, you could specify a JSON configuration file to configure the extraction progress.In the json configuration file, you can specify the list and column to be exported.
    Configuring the PnP Provisioning Engine
    Test json for your reference:

    {  
        "$schema":"https://aka.ms/sppnp-extract-configuration-schema",  
        "persistAssetFiles": true,  
        "handlers": [  
            "Lists"      
        ],  
        "lists": {  
            "lists": [  
                {  
                    "title": "list",  
                    "includeItems": true,  
                    "query": {  
                        "includeAttachments": false,  
                        "camlQuery": "<View></View>",  
                        "viewFields": [ "Title"]  
                    }  
                }  
            ]  
        }   
    }  
    

    Test result:
    52731-image.png


    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  2. Jurgen Verhelst 326 Reputation points
    2021-01-01T14:01:35.16+00:00

    Thanks Amos,

    Ok that way I could prevent the links to the planner of another site being added to the new site

    Any info on copying the plan to a new site collection with the links in a new site collection?

    Or is the way I discribed the fastest, export to excell and recreate the tasks and buckets with powershell for planner?