PnP PowerShell 2013 - Remove lists from extracted template

Highlighted
Occasional Contributor

Hi there,
I want to automate my template modification, for example: I only extract my lists but I don’t need all of them and I want to automatically filter them to keep my two custom lists, nothing else.
Is there any guidance how to edit the template xml with PowerShell? I have troubles to make it work for myself.
Thanks!

David

1 Reply
Highlighted

Hi @Dávid Sass,

 

Are you using .pnp or the .xml format.

 

If you are using .xml then you could use:

 

[xml]$xmlDoc = Get-Content -Path c:\temp\template.xml

 

you will then have an xml object which you can adjust to your needs.