Skip to content

[BUG] List permanently deleted without confirmation by Invoke-PnPSiteTemplate #5180

@gabbsmo

Description

@gabbsmo

Reporting an Issue or Missing Feature

Issue

Expected behavior

When Invoke-PnPSiteTemplate may delete a list (or anything) the user should be prompted for confirmation, unless they used the -Force switch.

Deleted artifacts should be moved to the recycle bin when possible.

Actual behavior

There is no confirmation. List is permanently deleted.

Steps to reproduce behavior

  1. Export a list using Get-PnPSiteTemplate -Handlers Lists, Fields -ListsToExtract "My list" -Out ".\my_list.xml"
  2. Change the URL (not title) to the list in the XML
  3. Import the list using Invoke-PnPSiteTemplate ".\my_list.xml"

What is the version of the Cmdlet module you are running?

3.1.0

Which operating system/environment are you running PnP PowerShell on?

  • Windows
  • Linux
  • MacOS
  • Azure Cloud Shell
  • Azure Functions
  • Other : please specify

Notes

I naively tried to import a second instance of the same list template. Me not testing this properly before running it is on me of course. But since PnP PowerShell usually in my expereince asks for confirmation before deleting I logged this as a bug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions