SlideShare una empresa de Scribd logo
1 de 36
ERIC OVERFIELD | PixelMill
Microsoft MVP & RD
ALL YOU NEED TO KNOW FOR
AUTOMATED SHAREPOINT
SITE PROVISIONING WITH
PNP POWERSHELL
http://pxml.ly/EO-PnP-Provisioning
https://github.com/eoverfield/SPPnP-Demos
ERIC OVERFIELD
President & Co-Founder of PixelMill
Microsoft MVP, Office Servers & Services
Microsoft Regional Director
Published SharePoint Author
SharePoint Community Organizer & Contributor @ericoverfield
ericoverfield.com
PixelMill is a modern SharePoint Design Agency based in Northern California. On the forefront of
web design trends since 1998, PixelMill provides innovative collaboration portals to enhance the
user adoption of SharePoint intranets, extranets, and public facing sites.
PIXELMILL
@pixelmillteam
pixelmill.com
1. SharePoint Provisioning Review
2. Introduction to SharePoint PnP
3. Provisioning SharePoint With PnP and PowerShell
4. Tips, Best Practices, and Demos
OVERVIEW
SHAREPOINT
PROVISIONING
@ericoverfieldericoverfield.com
SharePoint Deployment Components
• Site columns
• Content Types
• List Templates
• List Instances
• Master Pages
• Page Layouts
• General branding assets (CSS, JS, etc)
COMMON SHAREPOINT DEPLOYMENT REQUIREMENTS
• Content Pages
• Site Templates
• Office 365 Groups
• Auto-Feature Activation
• Site Configuration Settings
• Property Bag*
• Search Setup
@ericoverfieldericoverfield.com
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
TRADITIONAL SHAREPOINT DEVELOPMENT METHODS
@ericoverfieldericoverfield.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 maintenance
Custom V16.x
SharePoint/O365 v16.x.next
SharePoint Framework
Copy Customizations
OOTBTime
A BETTER WAY
SHAREPOINT PNP
@ericoverfieldericoverfield.com
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 – consists of:
• Code, samples, best practices
• Videos, tutorials, and a toolset for customization and working with SharePoint
• Thanks core team – http://aka.ms/OfficeDevPnP
All available on github – https://github.com/SharePoint/PnP
SHAREPOINT / OFFICE 365 DEVELOPMENT PATTERNS AND
PRACTICES
Patterns & Practices
@ericoverfieldericoverfield.com
SHAREPOINT PNP
@ericoverfieldericoverfield.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
PnP Core
Component
Demo
INTRODUCTION TO SHAREPOINT PNP
PNP POWERSHELL AND
REMOTE PROVISIONING
@ericoverfieldericoverfield.com
SHAREPOINT PNP CORE COMPONENTS
PnP PowerShell based on a PnP Core Component
Remote Provisioning Schema
• https://github.com/SharePoint/PnP-Provisioning-Schema
Together provide a method to repeatedly provision
@ericoverfieldericoverfield.com
GETTING STARTED WITH PNP AND POWERSHELL
Install PnP PowerShell
• https://github.com/SharePoint/PnP-PowerShell#installation
Windows 10 – Very easy – Open PowerShell
• SPO: />Install-Module SharePointPnPPowerShellOnline –AllowClobber
• SP2016: />Install-Module SharePointPnPPowerShell2016 –AllowClobber
• SP2013: />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')
@ericoverfieldericoverfield.com
COMMON PNP POWERSHELL COMMANDS
Update PnP PowerShell – remember, monthly updates!
• Update-Module SharePointPnPPowerShell*
Connect to SharePoint Site
• Connect-PnPOnline -url http://pixelmill-tenant.sharepoint.com/ –Credentials (Get-Credential)
Work with SharePoint data once connected, such as:
• Get-PnPList
• Get-PnPWeb
Apply a provisioning template
• Apply-PnPProvisioningTemplate -Path template.xml
Get detailed help regarding a specific commandlet
• Get-Help Connect-PnPOnline -Detailed
Demo
PNP POWERSHELL
INTRODUCTION
@ericoverfieldericoverfield.com
PNP POWERSHELL USAGE SCENARIOS
Connect to a site
• Connect-PnPOnline -url http://pixelmill-tenant.sharepoint.com/ –Credentials (Get-Credential)
Get/set site/web/list/etc settings
• Get-PnPWeb, Set-PnPWeb, Get-PnPSite, Get-PnPPropertyBag
Query data, such as list data, search, etc
• Get-PnPSearchQuery –Query “product”
Create data, such as a list, or a group
• New-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 Template
• Apply-PnPProvisioningTemplate -Path .template.xml -Handlers Lists, Files, CustomActions
@ericoverfieldericoverfield.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
• Provision modern experiences as well including modern pages and SPFx webparts
@ericoverfieldericoverfield.com
PNP POWERSHELL PROVISIONING FRAMEWORK
https://msdn.microsoft.com/en-us/pnp_articles/introducing-the-pnp-provisioning-engine
@ericoverfieldericoverfield.com
PROVISIONING SHAREPOINT WITH PNP POWERSHELL
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
Demo
PNP PROVISIONING
TEMPLATE
@ericoverfieldericoverfield.com
SIMPLE POWERSHELL SCRIPTS FOR REPEATABLE
PATTERS
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-PnPWeb -SiteLogoUrl "" -AlternateCssUrl “ “
• /> Remove-PnPCustomAction -Identity $customAction.Id -Scope Site -Force
Demo
PNP PROVISIONING
WITH SCRIPTS
@ericoverfieldericoverfield.com
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
PNP
PARTNER PACK
@ericoverfieldericoverfield.com
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
Demo
PNP
PARTNER PACK
@ericoverfieldericoverfield.com
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
REVIEW
1. SharePoint Provisioning Review
2. Introduction to SharePoint PnP
3. Provisioning SharePoint With PnP and PowerShell
4. Tips, Best Practices, and Demos
RESOURCES
@ericoverfieldericoverfield.com
RESOURCE
S
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 Schema
https://github.com/SharePoint/PnP-Provisioning-Schema
SharePoint PnP PowerShell Command Reference
http://ericoverfield.com/sharepoint-pnp-powershell-command-reference/
Participating in SharePoint PnP Initiative
http://ericoverfield.com/participating-in-the-sharepoint-office-365-dev-patterns-and-practices-pnp-community-initiative/
Session Source Code
https://github.com/eoverfield/SPPnP-Demos
THANK YOU
ALL YOU NEED TO KNOW FOR
AUTOMATED SHAREPOINT
SITE PROVISIONING WITH
PNP POWERSHELL

Más contenido relacionado

La actualidad más candente

La actualidad más candente (20)

Broaden your dev skillset with SharePoint branding options
Broaden your dev skillset with SharePoint branding optionsBroaden your dev skillset with SharePoint branding options
Broaden your dev skillset with SharePoint branding options
 
SharePoint Fest Chicago 2019 - From SharePoint to Office 365 Development
SharePoint Fest Chicago 2019 - From SharePoint to Office 365 DevelopmentSharePoint Fest Chicago 2019 - From SharePoint to Office 365 Development
SharePoint Fest Chicago 2019 - From SharePoint to Office 365 Development
 
SharePoint Saturday Calgary 2017 - From SharePoint to Office 365 Development
SharePoint Saturday Calgary 2017 - From SharePoint to Office 365 DevelopmentSharePoint Saturday Calgary 2017 - From SharePoint to Office 365 Development
SharePoint Saturday Calgary 2017 - From SharePoint to Office 365 Development
 
What's in SharePoint land 2016 for the end user
What's in SharePoint land 2016 for the end userWhat's in SharePoint land 2016 for the end user
What's in SharePoint land 2016 for the end user
 
SharePoint Fest Seattle 2018 - From SharePoint to Office 365 Development
SharePoint Fest Seattle 2018 - From SharePoint to Office 365 DevelopmentSharePoint Fest Seattle 2018 - From SharePoint to Office 365 Development
SharePoint Fest Seattle 2018 - From SharePoint to Office 365 Development
 
SharePoint Saturday Ottawa - From SharePoint to Office 365 Development
SharePoint Saturday Ottawa - From SharePoint to Office 365 DevelopmentSharePoint Saturday Ottawa - From SharePoint to Office 365 Development
SharePoint Saturday Ottawa - From SharePoint to Office 365 Development
 
Matthias Einig from Rencore - Transforming SharePoint farm solutions to the A...
Matthias Einig from Rencore - Transforming SharePoint farm solutions to the A...Matthias Einig from Rencore - Transforming SharePoint farm solutions to the A...
Matthias Einig from Rencore - Transforming SharePoint farm solutions to the A...
 
ESPC Webinar - From SharePoint to Office 365 Development
ESPC Webinar - From SharePoint to Office 365 DevelopmentESPC Webinar - From SharePoint to Office 365 Development
ESPC Webinar - From SharePoint to Office 365 Development
 
SharePoint Fest DC 2018 - From SharePoint to Office 365 Development
SharePoint Fest DC 2018 - From SharePoint to Office 365 DevelopmentSharePoint Fest DC 2018 - From SharePoint to Office 365 Development
SharePoint Fest DC 2018 - From SharePoint to Office 365 Development
 
Getting started with the PnP Provisioning Engine
Getting started with the PnP Provisioning EngineGetting started with the PnP Provisioning Engine
Getting started with the PnP Provisioning Engine
 
SharePoint Fest Seattle 2019 - From SharePoint to Office 365 Development
SharePoint Fest Seattle 2019 - From SharePoint to Office 365 DevelopmentSharePoint Fest Seattle 2019 - From SharePoint to Office 365 Development
SharePoint Fest Seattle 2019 - From SharePoint to Office 365 Development
 
SharePoint Fest DC 2019 - From SharePoint to Office 365 Development
SharePoint Fest DC 2019 - From SharePoint to Office 365 DevelopmentSharePoint Fest DC 2019 - From SharePoint to Office 365 Development
SharePoint Fest DC 2019 - From SharePoint to Office 365 Development
 
An Introduction to the Office 365 Patterns and Practices Project
An Introduction to the Office 365 Patterns and Practices ProjectAn Introduction to the Office 365 Patterns and Practices Project
An Introduction to the Office 365 Patterns and Practices Project
 
ecs19 - Bill Ayers - RE-USE YOUR SHAREPOINT FRAMEWORK SKILLZ TO BUILD OFFICE ...
ecs19 - Bill Ayers - RE-USE YOUR SHAREPOINT FRAMEWORK SKILLZ TO BUILD OFFICE ...ecs19 - Bill Ayers - RE-USE YOUR SHAREPOINT FRAMEWORK SKILLZ TO BUILD OFFICE ...
ecs19 - Bill Ayers - RE-USE YOUR SHAREPOINT FRAMEWORK SKILLZ TO BUILD OFFICE ...
 
SPTechCon Austin 2019 - From SharePoint to Office 365 development
SPTechCon Austin 2019 - From SharePoint to Office 365 developmentSPTechCon Austin 2019 - From SharePoint to Office 365 development
SPTechCon Austin 2019 - From SharePoint to Office 365 development
 
ESPC 2016 - From SharePoint to Office 365 Development - The path to your new ...
ESPC 2016 - From SharePoint to Office 365 Development - The path to your new ...ESPC 2016 - From SharePoint to Office 365 Development - The path to your new ...
ESPC 2016 - From SharePoint to Office 365 Development - The path to your new ...
 
SharePoint Fest Chicago 2018 - From SharePoint to Office 365 development
SharePoint Fest Chicago 2018 - From SharePoint to Office 365 developmentSharePoint Fest Chicago 2018 - From SharePoint to Office 365 development
SharePoint Fest Chicago 2018 - From SharePoint to Office 365 development
 
O365: Attack of the Clones
O365: Attack of the ClonesO365: Attack of the Clones
O365: Attack of the Clones
 
Introduction to Office 365 PnP- Reusable solutions
Introduction to Office 365 PnP- Reusable solutionsIntroduction to Office 365 PnP- Reusable solutions
Introduction to Office 365 PnP- Reusable solutions
 
ECS 19 Ben Howard - THE PROJECT MANAGEMENT TOOLS WEB OF CONFUSION
ECS 19 Ben Howard - THE PROJECT MANAGEMENT TOOLS WEB OF CONFUSIONECS 19 Ben Howard - THE PROJECT MANAGEMENT TOOLS WEB OF CONFUSION
ECS 19 Ben Howard - THE PROJECT MANAGEMENT TOOLS WEB OF CONFUSION
 

Similar a All You Need to Know for Automated SharePoint Site Provisioning with PnP PowerShell

Similar a All You Need to Know for Automated SharePoint Site Provisioning with PnP PowerShell (20)

Getting started with Office365/SharePoint Patterns and Practices
Getting started with Office365/SharePoint Patterns and PracticesGetting started with Office365/SharePoint Patterns and Practices
Getting started with Office365/SharePoint Patterns and Practices
 
Transforming your full-trust solutions to the Add-in model / SharePoint Frame...
Transforming your full-trust solutions to the Add-in model / SharePoint Frame...Transforming your full-trust solutions to the Add-in model / SharePoint Frame...
Transforming your full-trust solutions to the Add-in model / SharePoint Frame...
 
An introduction to the office devpnp community initiative
An introduction to the office devpnp community initiativeAn introduction to the office devpnp community initiative
An introduction to the office devpnp community initiative
 
How to automate the SharePoint Provisioning
How to automate the SharePoint Provisioning How to automate the SharePoint Provisioning
How to automate the SharePoint Provisioning
 
SharePoint Fest Chicago - From SharePoint to Office 365 Development
SharePoint Fest Chicago - From SharePoint to Office 365 DevelopmentSharePoint Fest Chicago - From SharePoint to Office 365 Development
SharePoint Fest Chicago - From SharePoint to Office 365 Development
 
Azure Automation, PnP Provisioning and PnP PowerShell
Azure Automation, PnP Provisioning and PnP PowerShellAzure Automation, PnP Provisioning and PnP PowerShell
Azure Automation, PnP Provisioning and PnP PowerShell
 
Release Management with Visual Studio Team Services and Office Dev PnP
Release Management with Visual Studio Team Services and Office Dev PnPRelease Management with Visual Studio Team Services and Office Dev PnP
Release Management with Visual Studio Team Services and Office Dev PnP
 
Spsnyc transforming share point farm solutions to the add-in model and shar...
Spsnyc   transforming share point farm solutions to the add-in model and shar...Spsnyc   transforming share point farm solutions to the add-in model and shar...
Spsnyc transforming share point farm solutions to the add-in model and shar...
 
aOS Canadian Tour - Quebec - From SharePoint to Office 365 Development
aOS Canadian Tour  - Quebec - From SharePoint to Office 365 DevelopmentaOS Canadian Tour  - Quebec - From SharePoint to Office 365 Development
aOS Canadian Tour - Quebec - From SharePoint to Office 365 Development
 
aOS Canadian Tour - Ottawa - From SharePoint to Office 365 Development
aOS Canadian Tour - Ottawa - From SharePoint to Office 365 DevelopmentaOS Canadian Tour - Ottawa - From SharePoint to Office 365 Development
aOS Canadian Tour - Ottawa - From SharePoint to Office 365 Development
 
aOS Canadian Tour - Montreal - From SharePoint to Office 365 Development
aOS Canadian Tour - Montreal - From SharePoint to Office 365 DevelopmentaOS Canadian Tour - Montreal - From SharePoint to Office 365 Development
aOS Canadian Tour - Montreal - From SharePoint to Office 365 Development
 
aOS Canadian Tour - Toronto - From SharePoint to Office 365 Development
aOS Canadian Tour - Toronto - From SharePoint to Office 365 DevelopmentaOS Canadian Tour - Toronto - From SharePoint to Office 365 Development
aOS Canadian Tour - Toronto - From SharePoint to Office 365 Development
 
Spsbcn 2017 how to use PnP assets
Spsbcn 2017 how to use PnP assetsSpsbcn 2017 how to use PnP assets
Spsbcn 2017 how to use PnP assets
 
How to convert your Full Trust Solutions to the SharePoint Framework (SPFx)
How to convert your Full Trust Solutions to the SharePoint Framework (SPFx)How to convert your Full Trust Solutions to the SharePoint Framework (SPFx)
How to convert your Full Trust Solutions to the SharePoint Framework (SPFx)
 
Branding Office 365 w/ Front End Tools + SharePoint PnP
Branding Office 365 w/ Front End Tools + SharePoint PnPBranding Office 365 w/ Front End Tools + SharePoint PnP
Branding Office 365 w/ Front End Tools + SharePoint PnP
 
SplunkLive! Amsterdam 2015 - Web Framework & 3rd Party Visualization
SplunkLive! Amsterdam 2015 - Web Framework & 3rd Party VisualizationSplunkLive! Amsterdam 2015 - Web Framework & 3rd Party Visualization
SplunkLive! Amsterdam 2015 - Web Framework & 3rd Party Visualization
 
Branding Deployment in Office 365 and SharePoint 2013/2016
Branding Deployment in Office 365 and SharePoint 2013/2016Branding Deployment in Office 365 and SharePoint 2013/2016
Branding Deployment in Office 365 and SharePoint 2013/2016
 
SPSCasablanca - SPFx Deployment
SPSCasablanca - SPFx DeploymentSPSCasablanca - SPFx Deployment
SPSCasablanca - SPFx Deployment
 
Automated deployment mar 2019
Automated deployment mar 2019Automated deployment mar 2019
Automated deployment mar 2019
 
Introduction to Office Development Topics
Introduction to Office Development TopicsIntroduction to Office Development Topics
Introduction to Office Development Topics
 

Más de Eric Overfield

Más de Eric Overfield (15)

Branding Modern SharePoint
Branding Modern SharePointBranding Modern SharePoint
Branding Modern SharePoint
 
Microsoft Ignite 2016 In Review
Microsoft Ignite 2016 In ReviewMicrosoft Ignite 2016 In Review
Microsoft Ignite 2016 In Review
 
The Future of SharePoint - What You Need to Know
The Future of SharePoint - What You Need to KnowThe Future of SharePoint - What You Need to Know
The Future of SharePoint - What You Need to Know
 
Branding SharePoint from Prototype to Deployment - Workshop
Branding SharePoint from Prototype to Deployment - WorkshopBranding SharePoint from Prototype to Deployment - Workshop
Branding SharePoint from Prototype to Deployment - Workshop
 
Create your own SharePoint Master Pages and Page Layouts
Create your own SharePoint Master Pages and Page LayoutsCreate your own SharePoint Master Pages and Page Layouts
Create your own SharePoint Master Pages and Page Layouts
 
Share point 2013 apps and i mean it
Share point 2013 apps and i mean itShare point 2013 apps and i mean it
Share point 2013 apps and i mean it
 
Your SharePoint 2013 Branding Initiation
Your SharePoint 2013 Branding InitiationYour SharePoint 2013 Branding Initiation
Your SharePoint 2013 Branding Initiation
 
Shape SharePoint 2013 for Mobile
Shape SharePoint 2013 for MobileShape SharePoint 2013 for Mobile
Shape SharePoint 2013 for Mobile
 
The 2013 Design Manager - From HTML to SharePoint
The 2013 Design Manager - From HTML to SharePointThe 2013 Design Manager - From HTML to SharePoint
The 2013 Design Manager - From HTML to SharePoint
 
The Design Dilemma of Mobile and SharePoint
The Design Dilemma of Mobile and SharePointThe Design Dilemma of Mobile and SharePoint
The Design Dilemma of Mobile and SharePoint
 
Integrating Search Driven Content in SharePoint 2013/2016/O365
Integrating Search Driven Content in SharePoint 2013/2016/O365Integrating Search Driven Content in SharePoint 2013/2016/O365
Integrating Search Driven Content in SharePoint 2013/2016/O365
 
Enhance SharePoint 2013 with Responsive Web Design
Enhance SharePoint 2013 with Responsive Web DesignEnhance SharePoint 2013 with Responsive Web Design
Enhance SharePoint 2013 with Responsive Web Design
 
Enhancing SharePoint with Responsive Web Design
Enhancing SharePoint with Responsive Web DesignEnhancing SharePoint with Responsive Web Design
Enhancing SharePoint with Responsive Web Design
 
Reshaping SharePoint for Evolving Internet Devices
Reshaping SharePoint for Evolving Internet DevicesReshaping SharePoint for Evolving Internet Devices
Reshaping SharePoint for Evolving Internet Devices
 
SharePoint Branding - Change Your Look
SharePoint Branding - Change Your LookSharePoint Branding - Change Your Look
SharePoint Branding - Change Your Look
 

Último

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Último (20)

Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 

All You Need to Know for Automated SharePoint Site Provisioning with PnP PowerShell

  • 1. ERIC OVERFIELD | PixelMill Microsoft MVP & RD ALL YOU NEED TO KNOW FOR AUTOMATED SHAREPOINT SITE PROVISIONING WITH PNP POWERSHELL http://pxml.ly/EO-PnP-Provisioning https://github.com/eoverfield/SPPnP-Demos
  • 2. ERIC OVERFIELD President & Co-Founder of PixelMill Microsoft MVP, Office Servers & Services Microsoft Regional Director Published SharePoint Author SharePoint Community Organizer & Contributor @ericoverfield ericoverfield.com
  • 3. PixelMill is a modern SharePoint Design Agency based in Northern California. On the forefront of web design trends since 1998, PixelMill provides innovative collaboration portals to enhance the user adoption of SharePoint intranets, extranets, and public facing sites. PIXELMILL @pixelmillteam pixelmill.com
  • 4. 1. SharePoint Provisioning Review 2. Introduction to SharePoint PnP 3. Provisioning SharePoint With PnP and PowerShell 4. Tips, Best Practices, and Demos OVERVIEW
  • 6. @ericoverfieldericoverfield.com SharePoint Deployment Components • Site columns • Content Types • List Templates • List Instances • Master Pages • Page Layouts • General branding assets (CSS, JS, etc) COMMON SHAREPOINT DEPLOYMENT REQUIREMENTS • Content Pages • Site Templates • Office 365 Groups • Auto-Feature Activation • Site Configuration Settings • Property Bag* • Search Setup
  • 7. @ericoverfieldericoverfield.com 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 TRADITIONAL SHAREPOINT DEVELOPMENT METHODS
  • 8. @ericoverfieldericoverfield.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 maintenance Custom V16.x SharePoint/O365 v16.x.next SharePoint Framework Copy Customizations OOTBTime
  • 10. @ericoverfieldericoverfield.com 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 – consists of: • Code, samples, best practices • Videos, tutorials, and a toolset for customization and working with SharePoint • Thanks core team – http://aka.ms/OfficeDevPnP All available on github – https://github.com/SharePoint/PnP SHAREPOINT / OFFICE 365 DEVELOPMENT PATTERNS AND PRACTICES Patterns & Practices
  • 12. @ericoverfieldericoverfield.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 PnP Core Component
  • 13.
  • 16. @ericoverfieldericoverfield.com SHAREPOINT PNP CORE COMPONENTS PnP PowerShell based on a PnP Core Component Remote Provisioning Schema • https://github.com/SharePoint/PnP-Provisioning-Schema Together provide a method to repeatedly provision
  • 17. @ericoverfieldericoverfield.com GETTING STARTED WITH PNP AND POWERSHELL Install PnP PowerShell • https://github.com/SharePoint/PnP-PowerShell#installation Windows 10 – Very easy – Open PowerShell • SPO: />Install-Module SharePointPnPPowerShellOnline –AllowClobber • SP2016: />Install-Module SharePointPnPPowerShell2016 –AllowClobber • SP2013: />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')
  • 18. @ericoverfieldericoverfield.com COMMON PNP POWERSHELL COMMANDS Update PnP PowerShell – remember, monthly updates! • Update-Module SharePointPnPPowerShell* Connect to SharePoint Site • Connect-PnPOnline -url http://pixelmill-tenant.sharepoint.com/ –Credentials (Get-Credential) Work with SharePoint data once connected, such as: • Get-PnPList • Get-PnPWeb Apply a provisioning template • Apply-PnPProvisioningTemplate -Path template.xml Get detailed help regarding a specific commandlet • Get-Help Connect-PnPOnline -Detailed
  • 20. @ericoverfieldericoverfield.com PNP POWERSHELL USAGE SCENARIOS Connect to a site • Connect-PnPOnline -url http://pixelmill-tenant.sharepoint.com/ –Credentials (Get-Credential) Get/set site/web/list/etc settings • Get-PnPWeb, Set-PnPWeb, Get-PnPSite, Get-PnPPropertyBag Query data, such as list data, search, etc • Get-PnPSearchQuery –Query “product” Create data, such as a list, or a group • New-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 Template • Apply-PnPProvisioningTemplate -Path .template.xml -Handlers Lists, Files, CustomActions
  • 21. @ericoverfieldericoverfield.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 • Provision modern experiences as well including modern pages and SPFx webparts
  • 22. @ericoverfieldericoverfield.com PNP POWERSHELL PROVISIONING FRAMEWORK https://msdn.microsoft.com/en-us/pnp_articles/introducing-the-pnp-provisioning-engine
  • 23. @ericoverfieldericoverfield.com PROVISIONING SHAREPOINT WITH PNP POWERSHELL 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
  • 25. @ericoverfieldericoverfield.com SIMPLE POWERSHELL SCRIPTS FOR REPEATABLE PATTERS 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-PnPWeb -SiteLogoUrl "" -AlternateCssUrl “ “ • /> Remove-PnPCustomAction -Identity $customAction.Id -Scope Site -Force
  • 27. @ericoverfieldericoverfield.com 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
  • 29. @ericoverfieldericoverfield.com 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
  • 31. @ericoverfieldericoverfield.com 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
  • 32.
  • 33. REVIEW 1. SharePoint Provisioning Review 2. Introduction to SharePoint PnP 3. Provisioning SharePoint With PnP and PowerShell 4. Tips, Best Practices, and Demos
  • 35. @ericoverfieldericoverfield.com RESOURCE S 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 Schema https://github.com/SharePoint/PnP-Provisioning-Schema SharePoint PnP PowerShell Command Reference http://ericoverfield.com/sharepoint-pnp-powershell-command-reference/ Participating in SharePoint PnP Initiative http://ericoverfield.com/participating-in-the-sharepoint-office-365-dev-patterns-and-practices-pnp-community-initiative/ Session Source Code https://github.com/eoverfield/SPPnP-Demos
  • 36. THANK YOU ALL YOU NEED TO KNOW FOR AUTOMATED SHAREPOINT SITE PROVISIONING WITH PNP POWERSHELL

Notas del editor

  1. Slides will be available from blog and twitter In-depth look at PnP and in particular the provisioning aspect of PnP Who has worked with PnP? Story is remembering when creating a VS solution for provisioning in 2008, create from scratch, then 2010 gave us a template. Full trusts required service app recycle, sandbox only hit site collection. Add-ins didn’t help.
  2. Will make available on blog and twitter (slideshare.net), so if you remember one of those then you can always review everything we discuss
  3. Demos
  4. Focus here on provisioning SharePoint sites / assets / settings, etc
  5. SP keeps changing, open community on best practices makes sense Feature Framework too rigid For many features, requires full-tust (O365 with cross out) Based on a snapshot of SP Difficult to upgrade and maintain
  6. Examples (Code) Best Practices Documentation It is a give and take, mostly take, but do consider giving
  7. https://github.com/SharePoint/PnP
  8. Get-Module SharePointPnPPowerShell* -ListAvailable | Select-Object Name,Version | Sort-Object Version –Descending Install-Module SharePointPnPPowerShellOnline -AllowClobber Update-Module SharePointPnPPowerShell* Get-Command -Module *PnP* Connect-PnPOnline -url https://pixelmill.sharepoint.com/sites/demo-installation –Credentials (Get-Credential) Get-PnPList Get-Help Connect-PnPOnline -Detailed
  9. Connect-PnPMicrosoftGraph –Scopes “Group.ReadWrite.All” “User.Read.All” New-PnPUnifiedGroup -DisplayName “PnP Demo” -Description “PnP Demo Group” -MailNickname “PnPDemo” Get-PnPUnifiedGroup Remove-PnPUnifiedGroup –Identity “PnP Demo”
  10. https://msdn.microsoft.com/en-us/pnp_articles/introducing-the-pnp-provisioning-engine
  11. https://github.com/SharePoint/PnP-Provisioning-Schema https://github.com/SharePoint/PnP-Provisioning-Schema/tree/master/Samples Look at custom example Connect-PnPOnline -url https://pixelmill.sharepoint.com/sites/demo-pnp-provisioning –Credentials (Get-Credential) Apply-SPOProvisioningTemplate -Path .\templates\Provision.Infrastructure.xml Apply-SPOProvisioningTemplate -Path .\templates\Provision.Data.xml -Handlers Lists Apply-SPOProvisioningTemplate -Path .\templates\Provision.Data.xml -Handlers Files Apply-SPOProvisioningTemplate -Path .\templates\Provision.CustomActions.xml -Parameters @{"InfrastructureSiteUrl"="https://”yourtenant”.sharepoint.com/sites/demo-pnp-provisioning"}
  12. Show Install script .\PnP-Provision.ps1 -TargetWebUrl "https://”yourtenant”.sharepoint.com/sites/demo-pnp-provisioning" .\PnP-Provision-Disable.ps1 -TargetWebUrl "https://”yourtenant”.sharepoint.com/sites/demo-pnp-provisioning"
  13. https://github.com/SharePoint/PnP-Partner-Pack https://github.com/SharePoint/PnP-Partner-Pack/blob/master/Documentation/Architecture-and-Implementation.md https://github.com/SharePoint/PnP-Partner-Pack/blob/master/Documentation/Manual-Setup-Guide.md