Can you run a UserCustomAction with Powershell? I am planing to automate a process and this is the easiest way.
4
-
sharepoint online or on prem? – Waqas Sarwar MVP♦ Oct 31 '18 at 10:52
-
sharepoint on-prem – Joshua Dominic Sibug Oct 31 '18 at 10:57
-
do you want to deploy/add a custom action using PS ? sorry i didnt understand :( – Gautam Sheth Oct 31 '18 at 12:08
-
I wan to run it, as if I am calling a function – Joshua Dominic Sibug Nov 1 '18 at 2:54
Add a comment
|
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"
$exampleAction.Update()
-
Why is this upvoted? OP asked for a way to RUN it, not a way to add it to a list. – Arg0n Nov 21 '19 at 10:47