Date post: | 03-Mar-2017 |
Category: |
Education |
Upload: | eric-overfield |
View: | 197 times |
Download: | 0 times |
SharePoint Advocate and EnthusiastPixelMill
ERIC OVERFIELD | @ericoverfield
WHO NEEDS A DEVELOPERFOR AUTOMATEDSHAREPOINTPROVISIONING
@ericoverfield http://pxml.ly/EO-PnP-Provisioning
Founder and SharePoint Branding/UI Lead, PixelMillSpeaker, Teacher, Advocate, AuthorSharePoint Community OrganizerLocated in Davis, CA
Co-author: “Black Magic Solutions for White Hat
SharePoint”
(August, 2013)
Co-author: “Pro SharePoint 2013 Branding and Responsive Web
Development” (Apress – June 12th, 2013)Order Your Copyhttp://pxml.ly/zsqykd
ericoverfield.com
@ericoverfield
INTRODUCTION ERIC OVERFIELD
WHAT YOU WILL LEARN TODAY
1
2
3
@ericoverfield
SHAREPOINT PROVISIONING REVIEW
INTRODUCTION TO SHAREPOINT PNP
PROVISIONING SHAREPOINT WITH PNP AND POWERSHELL
4 TIPS, BEST PRACTICES, AND DEMOS
ericoverfield.com
COMMON SHAREPOINT DEPLOYMENT REQUIREMENTS
SharePoint deployment components
Site columns Content Types List Templates List Instances Master Pages Page Layouts General branding assets (CSS, JS,
etc) @ericoverfield
ericoverfield.com
Content Pages Site Templates Office 365 Groups Auto-Feature Activation Site Configuration Settings Property Bag* Search Setup
TRADITIONAL SHAREPOINT DEPLOYMENT METHODS
Feature Framework Full Trust – SharePoint 2007 Sandbox – SharePoint 2010 (somewhat deprecated in SPO) Add-ins – SharePoint 2013+
Traditionally required Visual Studio Compiled code often used – not cloud friendly Add-in model clunky for provisioning
@ericoverfield
ericoverfield.com
FEATURE FRAMEWORK CHALLENGE
Customized site based on snapshot of existing OOTB site template with Feature provided customization provisioning
Custom v16.x
SharePoint/O365 v16.x
Custom v16.x
SharePoint/O365 v16.x.1
Features / enhancement / bug fixes / new experiences
released and available to new or existing sites. Deployed
automatically
New features / experiences not available / difficult to transfer without continual on-going maintenanceCustom V16.x
SharePoint/O365 v16.x.next
SharePoint Framework
Copy CustomizationsOOTBTime
SHAREPOINT / OFFICE 365 DEVELOPMENT PATTERNS AND PRACTICES
SharePoint PnP – An open source initiative Originally created by Microsoft and a few others in 2013 Thanks core team - http://aka.ms/OfficeDevPnP
Not related to Microsoft’s general Patterns and Practices initiative
SharePoint PnP – For SharePoint 2013/2016/O365 - consist of:
Code, samples, best practices Videos, tutorials and a toolset for customizing and working with
SharePoint All available on github - https://github.com/SharePoint/PnP
@ericoverfield
ericoverfield.com
SHAREPOINT PNP CORE COMPONENTS
Project source – get the code, resources and contribute https://github.com/SharePoint/PnP
Core Component - https://github.com/SharePoint/PnP-Sites-Core Useful to build SharePoint ready console apps
PnP PowerShell - https://github.com/sharepoint/pnp-powershell/
JavaScript Core Library - https://github.com/SharePoint/PnP-JS-Core
Partner Pack - https://github.com/SharePoint/PnP-Partner-Pack
Monthly – Bi-weekly community calls - http://pxml.ly/2mjpckv@ericoverfield
ericoverfield.com
SHAREPOINT PNP CORE COMPONENTS
PnP PowerShell based on PnP Core Component Remote Provisioning Schema
https://github.com/SharePoint/PnP-Provisioning-Schema Together provide a method to repeatedly provision
@ericoverfield
ericoverfield.com
GETTING STARTED WITH PNP AND POWERSHELL
Install PnP PowerShell https://github.com/SharePoint/PnP-PowerShell#installation
Windows 10 – Very easy – Open PowerShellSPO: />Install-Module SharePointPnPPowerShellOnline -AllowClobberSP2016: />Install-Module SharePointPnPPowerShell2016 -AllowClobberSP2013: />Install-Module SharePointPnPPowerShell2013 –AllowClobber
Have at least PowerShell V3? /> $PSVersionTable.PSVersion/> Invoke-Expression (New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/OfficeDev/PnP-PowerShell/master/Samples/Modules.Install/Install-SharePointPnPPowerShell.ps1')@ericoverfie
ldericoverfield.com
COMMON PNP POWERSHELL COMMANDS
Update PnP PowerShell – remember, monthly updates!Update-Module SharePointPnPPowerShell*
Connect to SharePoint SiteConnect-PnPOnline -url http://pixelmill-tenant.sharepoint.com/ –Credentials (Get-Credential)
Work with SharePoint data once connected, such as:Get-PnPListGet-PnPWeb
Apply a provisioning templateApply-PnPProvisioningTemplate -Path template.xml
Get detailed help regarding a specific commandletGet-Help Connect-PnPOnline -Detailed
@ericoverfield
ericoverfield.com
PNP POWERSHELL USAGE SCENARIOS
Connect to a siteConnect-PnPOnline -url http://pixelmill-tenant.sharepoint.com/ –Credentials (Get-Credential)
Get/set site/web/list/etc settingsGet-PnPWeb, Set-PnPWeb, Get-PnPSite, Get-PnPPropertyBag
Query data, such as list data, search, etcGet-PnPSearchQuery –Query “product”
Create data, such as a list, or a groupNew-PnPList -Title "Demo Announcements" -Url "DemoAnnouncements" -Template Announcements Connect-PnPMicrosoftGraph –Scopes “Group.ReadWrite.All” “User.Read.All”New-PnPUnifiedGroup -DisplayName “PnP Demo” -Description “PnP Demo Group” -MailNickname “PnPDemo”
Provision SharePoint TemplateApply-SPOProvisioningTemplate -Path .\template.xml -Handlers Lists, Files, CustomActions@ericoverfie
ldericoverfield.com
PROVISIONING SHAREPOINT WITH PNP POWERSHELL
Create a provisioning template – Manually or based on “template” site XML based file based on a schema - https://github.com/SharePoint/PnP-Provisioning-Schema Can export from existing site: /> Get-PnPProvisioningTemplate -Out template.xml https://github.com/SharePoint/PnP-PowerShell/blob/master/Documentation/
GetPnPProvisioningTemplate.md Connect to SharePoint Site: Connect-PnPOnline Apply provisioning template
Many options and handlers to customize experience without having to rewrite template Apply-PnPProvisioningTemplate -Path template.xml -Handlers Lists, Files https://github.com/SharePoint/PnP-PowerShell/blob/master/Documentation/
ApplyPnPProvisioningTemplate.md Create a PowerShell script to standardize for your user cases
@ericoverfield
ericoverfield.com
PNP POWERSHELL PROVISIONING FRAMEWORK
https://msdn.microsoft.com/en-us/pnp_articles/introducing-the-pnp-provisioning-engine
THE POWER IS IN THE TEMPLATE
Provisioning templates may be broken up into general tasks Infrastructure (Site Columns, Content Types, Lists) Taxonomy (Terms) Files (Branding assets, master pages, page layouts, CSS, JS, Images, etc) Custom Actions
ericoverfield.com
@ericoverfield
SIMPLE POWERSHELL SCRIPTS FOR REPEATABE PATTERNS
Create installation and uninstall processes Apply-PnPProvisioningTemplate allows for sending in parameters i.e.: -Parameters @{"InfrastructureSiteUrl"=$rootPath}
Allow PS Script to accept parameters Script may include logic to provide multiple execution paths for provisioning
PnP Provisioning does not include an explicit uninstall / un-apply command Rather use other PnP commands to remove each component as needed /> Set-SPOWeb -SiteLogoUrl "" -AlternateCssUrl " “ /> Remove-SPOCustomAction -Identity $customAction.Id -Scope Site -Force
ericoverfield.com
@ericoverfield
PNP PROVISIONING LIMITATIONS
PnP is open source Not 100% flushed out – not a “Product” Not supported by Premier Support and other direct support channels Updated often – Good and bad – keep up to date Lively discussions do occur on GitHub project – if you find a bug, report it Or fix issues / feature requests yourself and submit pull requests
Custom actions currently not available with Modern UI / Modern Team Sites
ericoverfield.com
@ericoverfield
PNP PARTNER PACK JUMPSTART YOUR PROJECTS
PnP Partner Pack, currently V2 – A PnP Starter Kit A reusable solution that combines aspects of PnP – For Office 365 https://github.com/SharePoint/PnP-Partner-Pack
Includes many features Self-service site provisioning, fully configurable Responsive UI package for classic team sites UI widget for JavaScript injection to bypass custom master pages Governance tools – Azure WebJob based remote timer jobs Configurable branding
Installation is tricky, but getting better PnP Partner Pack installation video: https://www.youtube.com/watch?v=ezWYorZClTI
ericoverfield.com
@ericoverfield
CONTRIBUTING TO PNP
PnP is community driven Everyone – Anyone can contribute
Code, documentation, samples, PowerShell updates, fixes All available for contribution
A core team does control the flow and submission approval Contributions are reviewed for quality – good for all
Get started – Watch the video https://www.youtube.com/watch?v=ELeGFILRFfQ
ericoverfield.com
@ericoverfield
RESOURCES
@ericoverfield
PnP Partner Pack:https://github.com/SharePoint/PnP-Partner-Pack
PnP PowerShell:https://github.com/SharePoint/PnP-PowerShell
SharePoint PnP:https://github.com/SharePoint/PnP
PnP Provisioning Schemahttps://github.com/SharePoint/PnP-Provisioning-Schema
SharePoint PnP PowerShell Command Referencehttp://ericoverfield.com/sharepoint-pnp-powershell-command-reference/
ericoverfield.com
Participating in SharePoint PnP Initiativehttp://ericoverfield.com/participating-in-the-sharepoint-office-365-dev-patterns-and-practices-pnp-
community-initiative/