Is GetProvisioningTemplate method able to provision assets like images, css, js?

Highlighted
New Contributor

Hi all,

 

I've been trying out the Pnp provisioning framework to completely replace using wsp for content database assets (such as master pages, page layouts, content types, site columns, images, css, js, etc.).

 

The scenario I have is a site where everything is configured (with all previously assets), and start by running the GetProvisioningTemplate on that source site. After the content is persisted to filesystem, running the ApplyProvisioningTemplate on the destination site should basically "clone" all those assets.

 

However, it seems the GetProvisioningTemplate is not storing artifacts such as images, css, js (although it is storing the remaining ones). Is this by design or a usage problem ?

 

Thanks,

 

Bruno

 

10 Replies
Highlighted

Hi @Bruno Valente,

 

Are you using the Site Core or would you be happy to use the Powershell equivalent?

 

I'm hoping to release a set of PowerShell cripts that do exactly what you are looking for very soon. I'm going through some testing and completing the documentation.

 

https://veenstra.me.uk/2017/03/30/office-365-sharepoint-20132016-replicating-or-migrating-sharepoint...

 

 

Highlighted

I was using the site.core dll framework, not the powershell. However, is it something that you have done additionally to complement the information generated by the GetProvisioningTemplate ?

Highlighted

Hi @Bruno Valente,

 

I'm exporting multiple sites using the .xml file format. For each site that I want to export I'm specifying in an xml what I want to export and what I want to import. Additonally I can specify in this xml if I want to include data in lists or if I want to include content located in specified folders. This could be a document library but also easily a folder that contains display templates, images or whatever you like.

 

In a similar way I'm handling workarounds for known issues by updating the template.xml that is generated.

Highlighted

@Pieter Veenstra

 

that is a great addition only need to upload it from the same folders :)

Highlighted

@Pieter Veenstra

 

When do you think you will be able to share those scripts ? I can assist in the testing efford (if necessary)

Highlighted

Hi @Bruno Valente,

 

I expect to release this just after easter.

 

Highlighted

Hi @Pieter Veenstra

 

My offer still stands, if you need testing out the scripts.

 

Regards,

Highlighted

Hello All,

 

I also have the same requirement as Bruno.  I also would want to get contents (ASPX pages) from library like "Site Pages" library from the SPO site's source library and dump them onto the target site's "Site Pages" library.  

Can we do this using CSOM method?  

I have recently started exploring Pnp Provisioning Engine using articles like :

https://channel9.msdn.com/blogs/OfficeDevPnP/Getting-Started-with-PnP-Provisioning-Engine

 

Thanks,

Paresh 

Highlighted

Hi @Bruno Valente@Paresh S,

 

Please have a look at the solution:

 

https://veenstra.me.uk/2017/04/19/office-365-sharepoint-20132016-moving-sites-around/

 

You can now pick up the scripts from my github repository. The scripts didn't make it into the May release. So hopefully they will be available in June in the main PnP PowerShell repository.

 

Highlighted

@Pieter Veenstra what is the status on your attempt to get it into the PnP core powershell repository?

 

I'm asking since we have received few cases from customers that like to move from one Office 365 tenant to another and in the process carry with them selected site collections and subsites.. We keep referring them to use 3rd party tools but now I stumbled over your project and wonder if something is possible within the PnP maybe in combination with your project?