how to automate the sharepoint provisioning

Post on 22-Jan-2018

505 Views

Category:

Presentations & Public Speaking

5 Downloads

Preview:

Click to see full reader

TRANSCRIPT

How to Automate SharePoint Provisioning with PNP Framework

Knut Relbe-MoeCTO Knowledge People AS

Product Evangelist & Partner Manager Valo

2Slide

2

Office Server & Services MVP

Nintex vTE (Virtual Technical Evangelist)

SharePoint evangelist, mentor, speakerMigration ExpertEducator for GlasspaperMicrosoft Certified Trainer

Product Evangelist & Partner Manager ValoIntranet Box

Knut Relbe-Moe

knut@valointranet.com

https://linkedin.com/in/shareptkarm@shareptkarm

Thanks to the Sponsors!

What is the PnP Provisioning Engine?

• Open source community effort

• Framework for easily doing Remote Provisioning• Part of the OfficeDev PnP Core Library

• Object Oriented engine for easy and fast Remote Provisioning

• Capabilities• Automated Remote Provisioning

• Easy Site Template Generation/Extraction

• Available in Microsoft .NET

• There are PowerShell extensions for common tasks

• Supports templating of sites and artifacts• Reusable, updatable (delta handling)

Long story short…

• The PnP provisioning engine wraps CSOM and makes deployment and maintenance a breeze

• 100% reliant on CSOM (client side and managed)

Moving parts

PnP Provisioning Cmdlets

• Get-PnPProvisioningTemplate

• Apply-PnPProvisioningTemplate

• Get-PnPProvisioningTemplateFromGallery

• Add-PnPFileToProvisioningTemplate

• Convert-PnPFolderToProvisioningTemplate

• Load-PnPProvisioningTemplate

• New-PnPProvisioningTemplate

• New-PnPProvisioningTemplateFromFolder

• Remove-PnPFileFromProvisioningTemplate

• Save-PnPProvisioningTemplate

• Set-PnPProvisioningTemplateMetadata

PnP Provisioning Engine Main Features

• SP2013, SP2016 and SPO

• Delta templates

• XML, JSON formatter

• Site Columns

• Content Types

• Lists/Libraries Instances

• Features (Site or Web)

• Custom Actions (Site or Web)

• Files/Pages (Wiki, WebPart)

• Taxonomies

• Composed Looks

• Site Policies

• Web Settings

• Regional Settings

• UI Languages

• Resource Files

• Audit Settings

• Workflows (SPD only)

• Search Settings

• Publishing (including Page Layouts)

Using resource files

• Create resource files for every language you want to support and use the same names for the entries

https://twitter.com/sahilmalik/status/700297537174032384

Templates

• Templates are XML

• PnP provisioning schema covers most artifacts you can deploy declaratively with WPSs

• Can be exported!

Exporting templates

• Use PnP PowerShell to do exports:• Get-PNPProvisioningTemplate

• Get-PNPProvisioningTemplate -Out C:\ESPC\testprovisioning.xml

• Tip run the following command before an export (or import) with powershellin order to get more loggingSet-PNPTraceLog –On –Level Debug

Importing templates

• Use PnP PowerShell to do imports:• Apply-PNPProvisioningTemplate -Path c:\espc\testprovisioning.xml

• Apply to a subsite and not a root site:• Apply-PNPProvisioningTemplate -Path c:\ESPC\testprovisioning.xml -Web

/subsite

Using Resource Files

• <?xml version="1.0"?><pnp:Provisioning xmlns:pnp="…"><pnp:Preferences Generator="…" /><pnp:Localizations>

<pnp:Localization LCID="1033" Name="English" ResourceFile="SiteTemplate-en.resx"/>

<pnp:Localization LCID="1043" Name="Dutch" ResourceFile="SiteTemplate-nl.resx"/>

</pnp:Localizations><pnp:Templates ID="CONTAINER-TEMPLATE-8C075A44E60F4E82B8F013637DB1E654">

Using Resource Files

#

• <pnp:Templates ID="…">

• <pnp:ProvisioningTemplate ID="…" Version="1">

• <pnp:Lists>

• <pnp:ListInstance Title="{resource:ContactsListTitle}" Description="Use the Contacts list …" DocumentTemplate="" OnQuickLaunch="true" TemplateType="105" Url="Lists/contacts" MinorVersionLimit="0" MaxVersionLimit="0" DraftVersionVisibility="0" TemplateFeatureID="00bfea71-7e6d-4186-9ba8-c047ac750105" EnableFolderCreation="false">

• <pnp:Views>

aka.ms/OfficeDevPnP

Thanks to the Sponsors!

Thank youWith♥ from Valo Team

Questions? | Thank You

Knut Relbe-Moe

knut@valointranet.com

Session materials:

Materials will be available on slideshare, twitter and github

top related