Last active
September 10, 2017 19:03
-
-
Save ypcode/4feea7669b2c08984dd9b21b12db4fb4 to your computer and use it in GitHub Desktop.
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
param ( | |
[Parameter(Mandatory=$true)] | |
[string] $TargetWeb, | |
[Parameter(Mandatory=$true)] | |
[string] $TasksLibraryName, | |
[Parameter(Mandatory=$false)] | |
[string] $PageName = "Kanban Board", | |
[Parameter(Mandatory=$false)] | |
[string] $StatusFieldName="Status" | |
) | |
# Connect to the target SharePoint Website | |
Connect-PnPOnline $TargetWeb | |
# Fetch the tasks list for the specified name | |
$tasksList = Get-PnPList $TasksLibraryName | |
# Add the Client-side Page with the name specified | |
Add-PnPClientSidePage -Name $PageName | |
# Add the Kanban Board WebPart and configure its properties | |
Add-PnPClientSideWebPart -Page $PageName -Component KanbanBoard -WebPartProperties @{tasksListId=$tasksList.Id; statusFieldName="Status"} | |
# Publish the page when all config is done | |
Set-PnPClientSidePage -Identity $PageName -Publish |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment