How to automate the SharePoint Provisioning

sharePTkarm 1,174 views 20 slides Jun 24, 2017
Slide 1
Slide 1 of 20
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20

About This Presentation

In this session we will look into the provisioning toolset found within Office 365 Developer Patterns and Practices (PnP) to provision columns, content types, list templates, list and library instances, branding and file assets and even metadata and more all with XML provisioning templates and Power...


Slide Content

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

Office Server & Services MVP Nintex vTE (Virtual Technical Evangelist) SharePoint evangelist, mentor, speaker Migration Expert Educator for Glasspaper Microsoft Certified Trainer Product Evangelist & Partner Manager Valo Intranet Box Knut Relbe-Moe [email protected] 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 Provisioning Service (n instances) Admin Site Provisioning Queue App Authentication New Collaboration rooms (Site Collections) Site Templates (PnP)

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 powershell in order to get more logging Set- 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 < # ><Section title goes here> < 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 https://github.com/OfficeDev/PnP https://github.com/OfficeDev/PnP-Sites-Core https://github.com/OfficeDev/PnP-PowerShell https://github.com/OfficeDev/PnP-Tools https://github.com/OfficeDev/PnP-Guidance https://github.com/OfficeDev/PnP-Transformation https://github.com/OfficeDev/PnP-OfficeAddIns https://github.com/OfficeDev/PnP-Provisioning-Schema https://aka.ms/OfficeDevPnPVideos https://aka.ms/OfficeDevPnPMSDN https://aka.ms/OfficeDevPnPYammer https://aka.ms/OfficeDevPnPPartnerPack @OfficeDevPnP https://aka.ms/OfficeDevPnPCall https://docs.com/OfficeDevPnP

Thanks to the Sponsors!

Thank you With ♥ from Valo Team

Questions? | Thank You Knut Relbe-Moe [email protected] Session materials: Materials will be available on slideshare , twitter and github