Can you run a UserCustomAction with Powershell? I am planing to automate a process and this is the easiest way.

  • sharepoint online or on prem?
    – Waqas Sarwar MVP
    Oct 31, 2018 at 10:52
  • sharepoint on-prem Oct 31, 2018 at 10:57
  • do you want to deploy/add a custom action using PS ? sorry i didnt understand :( Oct 31, 2018 at 12:08
  • I wan to run it, as if I am calling a function Nov 1, 2018 at 2:54

1 Answer 1


See your question isn't quite clear but userCustomactions are possible using the web object that powershell provides.

You can deploy it on a list or library.

 $web = get-spweb "http://exampleURL.com"
 $appType = $web.lists[$listTitle]
 $exampleAction = $appType.UserCustomActions.Add();

 $exampleAction.Url = "ExampleURL"
 $exampleAction.Location = "Ribbon.ListItem.Actions.Controls"

 $exampleAction.Title = "Give it a title"
 $exampleAction.Description  = "Give it a description"
  • Why is this upvoted? OP asked for a way to RUN it, not a way to add it to a list.
    – Arg0n
    Nov 21, 2019 at 10:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.