how to automate the sharepoint provisioning

20
How to Automate SharePoint Provisioning with PNP Framework Knut Relbe-Moe CTO Knowledge People AS Product Evangelist & Partner Manager Valo

Upload: knut-relbe-moe-mvp-mct

Post on 22-Jan-2018

505 views

Category:

Presentations & Public Speaking


5 download

TRANSCRIPT

Page 1: How to automate the SharePoint Provisioning

How to Automate SharePoint Provisioning with PNP Framework

Knut Relbe-MoeCTO Knowledge People AS

Product Evangelist & Partner Manager Valo

Page 2: How to automate the SharePoint Provisioning

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

[email protected]

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

Page 3: How to automate the SharePoint Provisioning

Thanks to the Sponsors!

Page 4: How to automate the SharePoint Provisioning

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)

Page 5: How to automate the SharePoint Provisioning

Long story short…

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

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

Page 6: How to automate the SharePoint Provisioning

Moving parts

Page 7: How to automate the SharePoint Provisioning

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

Page 8: How to automate the SharePoint Provisioning

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)

Page 9: How to automate the SharePoint Provisioning

Using resource files

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

Page 10: How to automate the SharePoint Provisioning

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

Page 11: How to automate the SharePoint Provisioning

Templates

• Templates are XML

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

• Can be exported!

Page 12: How to automate the SharePoint Provisioning

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

Page 13: How to automate the SharePoint Provisioning

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

Page 14: How to automate the SharePoint Provisioning

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">

Page 15: How to automate the SharePoint Provisioning
Page 16: How to automate the SharePoint Provisioning

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>

Page 17: How to automate the SharePoint Provisioning

aka.ms/OfficeDevPnP

Page 18: How to automate the SharePoint Provisioning

Thanks to the Sponsors!

Page 19: How to automate the SharePoint Provisioning

Thank youWith♥ from Valo Team

Page 20: How to automate the SharePoint Provisioning

Questions? | Thank You

Knut Relbe-Moe

[email protected]

Session materials:

Materials will be available on slideshare, twitter and github