Skip to content

Instantly share code, notes, and snippets.

Created September 22, 2017 21:07
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Provisioning a modern team site with PnP PowerShell
Connect-PnPMicrosoftGraph -Scopes "Group.ReadWrite.All","User.Read.All"
$group = New-PnPUnifiedGroup -DisplayName "xxx" -Description "xxx" -MailNickname "xxx"
-Members "" -IsPrivate
Connect-PnPOnline $group.SiteUrl
# Here you would normally apply a Provisioning Template to create lists, libraries, web parts etc.
# based on a "template" site. Instead, I just want to show placing a couple web parts in a
# 2-column section to show how that works:
Add-PnPClientSideSection -Page "Home.aspx" -SectionTemplate TwoColumnRight
Add-PnPClientSideWebPart -DefaultWebPartType "NewsFeed" -Page "Home.aspx" -Section 1 -Column 1
Add-PnPClientSideWebPart -Component "SiteClassification" -Section 1 -Column 2 -Page $p
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment