Guest User

Untitled

a guest
Nov 16th, 2018
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. $credentials = Get-Credential
  2. Connect-PnPOnline "https://<your-tenant>.sharepoint.com/sites/<your-site>" -Credentials $credentials
  3.  
  4. $context = Get-PnPContext
  5. $web = Get-PnPWeb
  6. $context.Load($web)
  7. Execute-PnPQuery
  8.  
  9. $ca = $web.UserCustomActions.Add()
  10.  
  11. $ca.ClientSideComponentId = "67fd1d01-84e8-4fbf-85bd-292820ddbf32" // replace it with your value
  12. $ca.ClientSideComponentProperties = ""
  13. $ca.RegistrationId="101"
  14. $ca.RegistrationType="DocumentLibrary"
  15. $ca.Location = "ClientSideExtension.ListViewCommandSet"
  16. $ca.Name = "SPFxListViewCommandSet"
  17. $ca.Title = "List View CommandSet"
  18. $ca.Description = "Custom action for SPFxListViewCommandSet"
  19. $ca.Update()
  20.  
  21. $context.Load($web.UserCustomActions)
  22. Execute-PnPQuery
Add Comment
Please, Sign In to add comment