This PowerShell sample demonstrates how to use the Office Dev PnP Provisioning Engine to create and configure a site. This a script was used during Introduction to Office Dev PnP Ramp Up presentation and will create a site collection and will configure site columns, content type and list.
Applies to
- Office 365 Multi-Tenant (MT)
- Office 365 Dedicated (D)
- SharePoint 2013 on-premises
SharePoint Online Management Shell
Office Dev PnP PowerShell Commands
Script DevRampUp-Demo-PnP-ProvisioningEngine.ps1 CustomizationXmlFragment.xml
Author(s)
Ivan Bondy (Microsoft)
Version: 1.0
Version Date: 1/29/2016
Comments: Initial release
THIS CODE IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANT ABILITY, OR NON-INFRINGEMENT.
- Replace <'Tenant'> tag with actual tenant name
- Replace <'User'> tag with site's user name
- Replace <'Local Drive Location'> tag with your values
Once pnptemplate.xml is generated by the Offide Dev PnP provisioning engine insert xml fragment from CustomizationXmlFragment.xml into pnptemplate.xml between pnp:ProvisioningTemplate</pnp:ProvisioningTemplate> tags.