{"id":5347,"date":"2019-08-16T07:13:27","date_gmt":"2019-08-16T07:13:27","guid":{"rendered":"https:\/\/www.softreetechnology.com\/?p=5347"},"modified":"2019-08-16T07:13:27","modified_gmt":"2019-08-16T07:13:27","slug":"get-and-apply-pnp-template-of-a-specific-list-or-library-using-pnp-provisioning-engine","status":"publish","type":"post","link":"https:\/\/softreetechnology.com\/blog\/sharepoint\/get-and-apply-pnp-template-of-a-specific-list-or-library-using-pnp-provisioning-engine\/","title":{"rendered":"Get And Apply PnP Template Of A Specific List Or Library Using PnP Provisioning Engine"},"content":{"rendered":"\n<p> This blog will show how to get a PnP template of a specific SharePoint list or document library and apply to another site collection using PnP provisioning engine.&nbsp;<\/p>\n\n\n\n<p>Using PnP provisioning you can model a site by configuring the design of site columns, content types, list definitions and instances, composed looks, pages (either web part pages or wiki pages), and much more, via your web browser. When you are done with the design, you can export what you have done into a persistent provisioning template format.&nbsp;PnP template is an XML file that contains a description of SharePoint elements (lists, libraries, pages, etc.) that will be created. You can create your own XML template for your SharePoint list or libraries. Then you can apply that template to as many target sites as you like. <\/p>\n\n\n\n<p> The script below will help you to get a template of a specific list or library. <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Connect-PnPOnline -Url https:\/\/tenant.sharepoint.com\/sites\/MySite  \n$listTitle = Read-Host \"Enter title of the list or library\"  \n$outputTemplateFile = \"ListTemplate.xml\";  \n$template = Get-PnPProvisioningTemplate -OutputInstance -Handlers Lists  \n$listTemplate = $template.Lists | Where-Object { $_.Title -eq $listTitle }  \n$template.Lists.Clear()  \n$template.Lists.Add($listTemplate)  \nSave-PnPProvisioningTemplate -InputInstance $template -Out $outputTemplateFile  <\/code><\/pre>\n\n\n\n<p> Once you execute the script, you will have the template for your specific list or document library.&nbsp;<\/p>\n\n\n\n<p>To apply the generated template back to another site you just need to run the &#8220;Apply-PnPProvisioningTemplate&#8221; cmdlet.&nbsp;<\/p>\n\n\n\n<p>The script below will help you apply the template to another site.&nbsp;Connect-PnPOnline-Url &#8211;&nbsp;<em>https:\/\/tenant.sharepoint.com\/sites\/OtherSite<\/em>&nbsp;Apply-PnPProvisioningTemplate-PathListTemplate.xml <\/p>\n\n\n\n<p><strong>This solution is brought to you by our SharePoint professionals.<\/strong><\/p>\n\n\n\n<p><strong><a href=\"https:\/\/www.softreetechnology.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">Softree Technology<\/a><\/strong>&nbsp;employs SharePoint consultants; we are a technology services provider with the aim to help companies achieve exceptional performance through SharePoint. Our dedicated team of SharePoint consultants has the right bent of mind to understand and execute customer requirements.<\/p>\n\n\n\n<p>Be it SPFx or SharePoint add-in developments,&nbsp;<strong><a href=\"https:\/\/www.softreetechnology.com\/sharepoint-2019-developments\/\" target=\"_blank\" rel=\"noreferrer noopener\">SharePoint 2019 developments<\/a><\/strong>, web part developments, migrating from SharePoint 2010\/2013 to SharePoint 2013\/2016\/Office 365, Office 365,&nbsp;SharePoint hosted apps development&nbsp;or something else in SharePoint, we strive to deliver the best<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This blog will show how to get a PnP template of a specific SharePoint list or document library and apply to another site collection using PnP provisioning engine.&nbsp; Using PnP provisioning you can model a site by configuring the design of site columns, content types, list definitions and instances, composed looks, pages (either web part pages or wiki pages), and [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":5350,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[290,43],"tags":[287,288,289,291],"class_list":["post-5347","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-pnp","category-sharepoint","tag-apply-pnpprovisioningtemplate","tag-get-a-pnp-template-of-a-specific-sharepoint-list","tag-get-pnpprovisioningtemplate","tag-save-pnpprovisioningtemplate"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Get And Apply PnP Template Of A Specific List Or Library Using PnP Provisioning Engine - Softree Technology<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/softreetechnology.com\/blog\/sharepoint\/get-and-apply-pnp-template-of-a-specific-list-or-library-using-pnp-provisioning-engine\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Get And Apply PnP Template Of A Specific List Or Library Using PnP Provisioning Engine - Softree Technology\" \/>\n<meta property=\"og:description\" content=\"This blog will show how to get a PnP template of a specific SharePoint list or document library and apply to another site collection using PnP provisioning engine.&nbsp; Using PnP provisioning you can model a site by configuring the design of site columns, content types, list definitions and instances, composed looks, pages (either web part pages or wiki pages), and [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/softreetechnology.com\/blog\/sharepoint\/get-and-apply-pnp-template-of-a-specific-list-or-library-using-pnp-provisioning-engine\/\" \/>\n<meta property=\"og:site_name\" content=\"Softree Technology\" \/>\n<meta property=\"article:published_time\" content=\"2019-08-16T07:13:27+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Get And Apply PnP Template Of A Specific List Or Library Using PnP Provisioning Engine - Softree Technology","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/softreetechnology.com\/blog\/sharepoint\/get-and-apply-pnp-template-of-a-specific-list-or-library-using-pnp-provisioning-engine\/","og_locale":"en_US","og_type":"article","og_title":"Get And Apply PnP Template Of A Specific List Or Library Using PnP Provisioning Engine - Softree Technology","og_description":"This blog will show how to get a PnP template of a specific SharePoint list or document library and apply to another site collection using PnP provisioning engine.&nbsp; Using PnP provisioning you can model a site by configuring the design of site columns, content types, list definitions and instances, composed looks, pages (either web part pages or wiki pages), and [&hellip;]","og_url":"https:\/\/softreetechnology.com\/blog\/sharepoint\/get-and-apply-pnp-template-of-a-specific-list-or-library-using-pnp-provisioning-engine\/","og_site_name":"Softree Technology","article_published_time":"2019-08-16T07:13:27+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"admin","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/softreetechnology.com\/blog\/sharepoint\/get-and-apply-pnp-template-of-a-specific-list-or-library-using-pnp-provisioning-engine\/#article","isPartOf":{"@id":"https:\/\/softreetechnology.com\/blog\/sharepoint\/get-and-apply-pnp-template-of-a-specific-list-or-library-using-pnp-provisioning-engine\/"},"author":{"name":"admin","@id":"https:\/\/softreetechnology.com\/blog\/#\/schema\/person\/98740297642f06debccdcee2de84086b"},"headline":"Get And Apply PnP Template Of A Specific List Or Library Using PnP Provisioning Engine","datePublished":"2019-08-16T07:13:27+00:00","mainEntityOfPage":{"@id":"https:\/\/softreetechnology.com\/blog\/sharepoint\/get-and-apply-pnp-template-of-a-specific-list-or-library-using-pnp-provisioning-engine\/"},"wordCount":316,"commentCount":0,"publisher":{"@id":"https:\/\/softreetechnology.com\/blog\/#organization"},"image":{"@id":"https:\/\/softreetechnology.com\/blog\/sharepoint\/get-and-apply-pnp-template-of-a-specific-list-or-library-using-pnp-provisioning-engine\/#primaryimage"},"thumbnailUrl":"","keywords":["Apply-PnPProvisioningTemplate","Get a PnP template of a specific SharePoint list","Get-PnPProvisioningTemplate","Save-PnPProvisioningTemplate"],"articleSection":["PnP","SharePoint"],"inLanguage":"en","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/softreetechnology.com\/blog\/sharepoint\/get-and-apply-pnp-template-of-a-specific-list-or-library-using-pnp-provisioning-engine\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/softreetechnology.com\/blog\/sharepoint\/get-and-apply-pnp-template-of-a-specific-list-or-library-using-pnp-provisioning-engine\/","url":"https:\/\/softreetechnology.com\/blog\/sharepoint\/get-and-apply-pnp-template-of-a-specific-list-or-library-using-pnp-provisioning-engine\/","name":"Get And Apply PnP Template Of A Specific List Or Library Using PnP Provisioning Engine - Softree Technology","isPartOf":{"@id":"https:\/\/softreetechnology.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/softreetechnology.com\/blog\/sharepoint\/get-and-apply-pnp-template-of-a-specific-list-or-library-using-pnp-provisioning-engine\/#primaryimage"},"image":{"@id":"https:\/\/softreetechnology.com\/blog\/sharepoint\/get-and-apply-pnp-template-of-a-specific-list-or-library-using-pnp-provisioning-engine\/#primaryimage"},"thumbnailUrl":"","datePublished":"2019-08-16T07:13:27+00:00","breadcrumb":{"@id":"https:\/\/softreetechnology.com\/blog\/sharepoint\/get-and-apply-pnp-template-of-a-specific-list-or-library-using-pnp-provisioning-engine\/#breadcrumb"},"inLanguage":"en","potentialAction":[{"@type":"ReadAction","target":["https:\/\/softreetechnology.com\/blog\/sharepoint\/get-and-apply-pnp-template-of-a-specific-list-or-library-using-pnp-provisioning-engine\/"]}]},{"@type":"ImageObject","inLanguage":"en","@id":"https:\/\/softreetechnology.com\/blog\/sharepoint\/get-and-apply-pnp-template-of-a-specific-list-or-library-using-pnp-provisioning-engine\/#primaryimage","url":"","contentUrl":""},{"@type":"BreadcrumbList","@id":"https:\/\/softreetechnology.com\/blog\/sharepoint\/get-and-apply-pnp-template-of-a-specific-list-or-library-using-pnp-provisioning-engine\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/softreetechnology.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Get And Apply PnP Template Of A Specific List Or Library Using PnP Provisioning Engine"}]},{"@type":"WebSite","@id":"https:\/\/softreetechnology.com\/blog\/#website","url":"https:\/\/softreetechnology.com\/blog\/","name":"Softree Technology","description":"Celebrating 10+ Years in SharePoint Consulting !","publisher":{"@id":"https:\/\/softreetechnology.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/softreetechnology.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en"},{"@type":"Organization","@id":"https:\/\/softreetechnology.com\/blog\/#organization","name":"Softree Technology","url":"https:\/\/softreetechnology.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en","@id":"https:\/\/softreetechnology.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/softreetechnology.com\/blog\/wp-content\/uploads\/2023\/03\/cropped-white-logo-soft.png","contentUrl":"https:\/\/softreetechnology.com\/blog\/wp-content\/uploads\/2023\/03\/cropped-white-logo-soft.png","width":844,"height":230,"caption":"Softree Technology"},"image":{"@id":"https:\/\/softreetechnology.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/softreetechnology.com\/blog\/#\/schema\/person\/98740297642f06debccdcee2de84086b","name":"admin","image":{"@type":"ImageObject","inLanguage":"en","@id":"https:\/\/softreetechnology.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/6fc78c8a7aa3fb0bf43c3b9a2e3962d7?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/6fc78c8a7aa3fb0bf43c3b9a2e3962d7?s=96&d=mm&r=g","caption":"admin"},"sameAs":["https:\/\/softreeconsulting.com"],"url":"https:\/\/softreetechnology.com\/blog\/author\/admin\/"}]}},"_links":{"self":[{"href":"https:\/\/softreetechnology.com\/blog\/wp-json\/wp\/v2\/posts\/5347","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/softreetechnology.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/softreetechnology.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/softreetechnology.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/softreetechnology.com\/blog\/wp-json\/wp\/v2\/comments?post=5347"}],"version-history":[{"count":0,"href":"https:\/\/softreetechnology.com\/blog\/wp-json\/wp\/v2\/posts\/5347\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/softreetechnology.com\/blog\/wp-json\/"}],"wp:attachment":[{"href":"https:\/\/softreetechnology.com\/blog\/wp-json\/wp\/v2\/media?parent=5347"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/softreetechnology.com\/blog\/wp-json\/wp\/v2\/categories?post=5347"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/softreetechnology.com\/blog\/wp-json\/wp\/v2\/tags?post=5347"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}