You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes you do not want to extract all artifacts from a site, or only even a specific list. For that the PnP Provisioning Engine uses a JSON formatted configuration file which gives you detailed control over the process.
11
+
12
+
## Extraction Configuration
13
+
14
+
There is a JSON schema available at https://aka.ms/sppnp-extract-configuration-schema. We will automatically update the schema referred to by that URL to a later version if new functionality comes available.
15
+
If you create a JSON file use a modern editor, like Visual Studio Code, and you reference this schema will there willl be intellisense and descriptions of all the properties you can set.
16
+
17
+
Let's have a look at the following sample configuration
Using the configuration above we limit the extraction of lists to only include the list called "My Test List". We're telling the engine that we do want to export list items to the template (they will show up as DataRow elements), and we tell the engine also to include any attachments if present. However, the engine will not download those attachments unless you set the ```persistAssetFiles``` property to ```true```.
61
+
62
+
Notice that you can specify more configuration options for lists, and we advice you to explore the schema further.
63
+
64
+
By default the engine only exports the home page if you specify the ```Pages``` handler. If you want to include all pages, set the ```includeAllClientSidePages``` property in the ```pages``` section to true.
65
+
66
+
## See also
67
+
68
+
-[SharePoint Patterns and Practices](https://github.com/SharePoint/PnP/)
69
+
-[SharePoint Developer Group at Microsoft Tech Community](https://techcommunity.microsoft.com/t5/SharePoint-Developer/bd-p/SharePointDev)
Copy file name to clipboardExpand all lines: docs/solution-guidance/pnp-provisioning-engine-and-the-core-library.md
+21-23Lines changed: 21 additions & 23 deletions
Original file line number
Diff line number
Diff line change
@@ -11,9 +11,6 @@ The PnP provisioning engine is the heart of the provisioning framework, and at i
11
11
12
12
Comprised of extension methods on the SharePoint CSOM/REST object model, the Core library enables provisioning tasks such as enumerating and getting provisioning templates as well as storing and then applying templates to new and existing sites. It also allows you to automate provisioning tasks and to introduce coded logic into your provisioning routines.
13
13
14
-
> [!NOTE]
15
-
> Office 365 CLI is an open-source tool with active community providing support for it. There is no SLA for the open-source tool support from Microsoft.
16
-
17
14
> [!NOTE]
18
15
> To see a video walkthrough of creating, persisting, and applying a provisioning template, go to [Getting Started with PnP provisioning engine](https://channel9.msdn.com/blogs/OfficeDevPnP/Getting-Started-with-PnP-Provisioning-Engine).
19
16
@@ -27,34 +24,47 @@ You can use one of two approaches for extracting your site design as a provision
27
24
28
25
### Using Windows PowerShell scripting to extract a provisioning template
29
26
30
-
To use Windows PowerShell scripts with the provisioning engine, you first must download and install the PnP PowerShell cmdlets. Everything you need to run Windows PowerShell, including download and installation instructions as well as the Windows PowerShell command documentation, is available in the [SharePointPnP.PowerShell Commands](https://github.com/SharePoint/PnP-PowerShell) repository on GitHub.
27
+
To use Windows PowerShell scripts with the provisioning engine, you first must download and install the PnP PowerShell cmdlets. Everything you need to run Windows PowerShell, including download and installation instructions as well as the Windows PowerShell command documentation, is available in the [PnP PowerShell Commands](https://github.com/SharePoint/PnP-PowerShell) repository on GitHub.
31
28
32
29
> [!NOTE]
33
-
> The SharePointPnP.PowerShell Commands repository contains three versions of the Windows PowerShell commands MSI. Two are for on-premises use (one for SharePoint 2013 and one for SharePoint 2016), and the third one is for SharePoint Online.
30
+
> The PnP PowerShell Commands repository contains four versions: one for SharePoint 2013, one for SharePoint 2016, one for SharePoint 2019 and one for SharePoint Online.
31
+
32
+
The recommended way to install the cmdlet is by using the PowerShell gallery:
The SharePointPnP.PowerShell Commands repository contains contents that enable you to build a library of Windows PowerShell commands that target SharePoint Online. The commands use CSOM and can work against both SharePoint Online and SharePoint on-premises, depending on which MSI package you install.
36
47
37
-
Additionally, there is a short Channel 9 video, [Introduction to PnP PowerShell Cmdlets](https://channel9.msdn.com/blogs/OfficeDevPnP/Introduction-to-PnP-PowerShell-Cmdlets), that discusses installing the Windows PowerShell package and connecting to your Office 365 site. In addition to installation and connection activities, the video covers other valuable information about using Windows PowerShell for remote provisioning.
38
48
39
49
### Using CSOM code to extract a provisioning template
40
50
41
51
To employ CSOM/REST code to extract a provisioning template, you simply create a development project by using Visual Studio or another development environment. Create any type of project—for example, a console or Windows application, or a SharePoint Add-in. After you create a development project, you must then install the Core library, which is available as a NuGet package.
42
52
43
53
> [!NOTE]
44
-
> Instructions for locating and installing the Core library NuGet package, and a walkthrough for a remote provisioning sample console application, are available in [Provisioning console application sample](provisioning-console-application-sample.md). Note that the Core library comes in two versions: one targets SharePoint Online, SharePoint, and Office 365; and one targets SharePoint on-premises.
54
+
> Instructions for locating and installing the Core library NuGet package, and a walkthrough for a remote provisioning sample console application, are available in [Provisioning console application sample](provisioning-console-application-sample.md). Note that the Core library comes in two versions: one targets SharePoint Online and one targets SharePoint on-premises.
45
55
46
56
While detailed instructions for using CSOM are in the provisioning console application sample, the general overview is like this:
47
57
48
-
1. Create a connection to Office 365.
58
+
1. Create a connection to SharePoint Online.
49
59
50
60
2. Create a **ClientContext** instance and retrieve a reference to a **Web** object.
51
61
52
62
3. Use the Core library's extension method, **GetProvisioningTemplate**, to extract a **ProvisioningTemplate** object.
53
63
54
64
4. Save the provisioning template instance to a file ___location of your choice by using a template provider and serialization formatter.
55
65
56
-
> [!NOTE]
57
-
> Because the template provider and the serialization formatter objects can be customized, you can implement whatever persistence storage and serialization format you like. Out-of-the-box, the PnP provisioning engine provides support for file system, SharePoint, and Azure Blob storage template providers. It also supports XML and JSON serialization formatters.
66
+
> [!NOTE]
67
+
> Because the template provider and the serialization formatter objects can be customized, you can implement whatever persistence storage and serialization format you like. Out-of-the-box, the PnP provisioning engine provides support for file system, SharePoint, and Azure Blob storage template providers. It also supports XML and JSON serialization formatters.
58
68
59
69
You can see an example of the XML serialization output and learn more about the XML serialization schema in the [PnP provisioning schema](pnp-provisioning-schema.md) article. You also can get the schema and its documentation on GitHub: [SharePoint/PnP-Provisioning-Schema](https://github.com/SharePoint/PnP-Provisioning-Schema/). The Channel 9 video [Deep dive into PnP provisioning engine schema](https://channel9.msdn.com/blogs/OfficeDevPnP/Deep-dive-to-PnP-provisioning-engine-schema) introduces and discusses the schema.
As with extracting the provisioning template, you can apply your customized **ProvisioningTemplate** object instance by using either CSOM/REST code or Windows PowerShell commands. You can download the [SharePointPnP.PowerShell Commands](https://github.com/SharePoint/PnP-PowerShell) from the repository on GitHub.
89
-
90
98
If applying the provisioning template by using extension methods of the Core library, you have a code block similar to the example here. In the example, the template is applied to the target site by using the **ApplyProvisioningTemplate** extension method of the **Web** type.
91
99
92
100
```csharp
@@ -118,16 +126,6 @@ using (var context = new ClientContext(destinationUrl))
118
126
}
119
127
```
120
128
121
-
<br/>
122
-
123
-
After you have created a connection to SharePoint Online by using the Windows PowerShell commands, employ the **Apply-PnPProvisioningTemplate** cmdlet as shown here.
Note that the `-Path` argument refers to the file path to the provisioning template file that you persisted to the file system. In the code block above, the persisted file is an XML file, but these template files can be persisted in any serialized format that you wish.
130
-
131
129
## PnP Core library
132
130
133
131
The Core library (OfficeDevPnP.Core) is a CSOM/REST object model that supports the PnP provisioning framework and enables the PnP provisioning engine. It consists of several namespaces, including a set of [extension methods](https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/extension-methods). These methods extend the SharePoint object model to support remote provisioning as well as objects for handling entities, timer jobs, provisioning templates, and the entirety of the provisioning framework. Table 1 lists namespaces in the Core library.
Copy file name to clipboardExpand all lines: docs/solution-guidance/pnp-provisioning-framework.md
-4Lines changed: 0 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -9,10 +9,6 @@ localization_priority: Priority
9
9
10
10
The PnP provisioning framework provides a code-centric and template-based platform for provisioning your site collections. The new provisioning engine allows you to persist and reuse provisioning models in Office 365 and SharePoint Online as well as on-premises site collections.
11
11
12
-
> [!NOTE]
13
-
> Office 365 CLI is an open-source tool with active community providing support for it. There is no SLA for the open-source tool support from Microsoft.
14
-
15
-
16
12
## Why the new approach?
17
13
18
14
With the introduction of SharePoint Add-ins and the add-in model (formerly known as the "app model"), Microsoft has moved away from sandboxed and full-trust solutions in favor of provider-hosted add-ins and on-premises solutions. These innovations have driven a retooling of the provisioning model and the introduction of a new provisioning engine.
0 commit comments