Skip to content

Commit bf3475d

Browse files
authored
Simplifying PnP PowerShell sample (SharePoint#6164)
Simplified the current _Provision a "modern" team site by using PnP PowerShell_ sample as it was overly complex for what it was trying to do
1 parent 38f513a commit bf3475d

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

docs/solution-guidance/modern-experience-customizations-provisioning-sites.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,7 @@ $teamSiteUrl = New-PnPSite -Type TeamSite -Title "displayName" -Alias "mymodernt
123123
Connect-PnPOnline $teamSiteUrl
124124
125125
# Now we have access on the SharePoint site for any operations
126-
$context = Get-PnPContext
127-
$web = Get-PnPWeb
128-
$context.Load($web, $web.WebTemplate)
129-
Execute-PnPQuery
126+
$web = Get-PnPWeb -Includes WebTemplate, Configuration
130127
$web.WebTemplate + "#" + $web.Configuration
131128
```
132129

0 commit comments

Comments
 (0)