Skip to content

Instantly share code, notes, and snippets.

@ypcode
Last active September 10, 2017 19:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ypcode/4feea7669b2c08984dd9b21b12db4fb4 to your computer and use it in GitHub Desktop.
Save ypcode/4feea7669b2c08984dd9b21b12db4fb4 to your computer and use it in GitHub Desktop.
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