In this blog article, I am going to add and remove custom action using PnP PowerShell.
Adding a custom action to the SharePoint site
The Add-PnPCustomAction command is used to add a user custom action to a web or site collection.
Example
This example adds a new custom action to the Site Settings and sets the Title, Name and other fields with the specified values.
Output

Getting the custom action information
The Get-PnPCustomAction command is used to return user custom action(s) of the web or current site collection.
Example 1
This example returns all custom actions of the current site.
Output

Example 2
This example returns the custom action with the id “47eaee71-7aa2-458a-8ca8-cbd48f5e68c3”.

Removing a custom action from the SharePoint site
The Remove-PnPCustomAction command is used to remove user custom action(s) from the current web or site collection.
Example
This example removes the custom action with the id “47eaee71-7aa2-458a-8ca8-cbd48f5e68c3”.



legendgod legendgodPosted Dec 19, 2019, 3:29 AM
What is "custom action" definition now? I thought it referred to the ribbon button or the list item menu.
Joe CPosted Apr 29, 2019, 12:50 PM
This is very useful. Thank you for this! Any idea how to find a Custom Action that was created on a Document Library using SPDesigner? I can't seem to find it using Get-PnPCustomAction.