Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $credentials = Get-Credential
- Connect-PnPOnline "https://<your-tenant>.sharepoint.com/sites/<your-site>" -Credentials $credentials
- $context = Get-PnPContext
- $web = Get-PnPWeb
- $context.Load($web)
- Execute-PnPQuery
- $ca = $web.UserCustomActions.Add()
- $ca.ClientSideComponentId = "67fd1d01-84e8-4fbf-85bd-292820ddbf32" // replace it with your value
- $ca.ClientSideComponentProperties = ""
- $ca.RegistrationId="101"
- $ca.RegistrationType="DocumentLibrary"
- $ca.Location = "ClientSideExtension.ListViewCommandSet"
- $ca.Name = "SPFxListViewCommandSet"
- $ca.Title = "List View CommandSet"
- $ca.Description = "Custom action for SPFxListViewCommandSet"
- $ca.Update()
- $context.Load($web.UserCustomActions)
- Execute-PnPQuery
Add Comment
Please, Sign In to add comment