Provisioning a modern team site with PnP PowerShell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Connect-PnPMicrosoftGraph -Scopes "Group.ReadWrite.All","User.Read.All" | |
$group = New-PnPUnifiedGroup -DisplayName "xxx" -Description "xxx" -MailNickname "xxx" | |
-Members "user@tenant.onmicrosoft.com" -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