In this blog, we will see how we can add a custom action in SharePoint site using PnP PowerShell. Also, we will see how we can get particular custom action and remove it from the SharePoint site using PnP PowerShell.
Add Custom Action:-
In the following example, I have added a personal action menu in my SharePoint site.
Get Particular Custom action and remove it from site:-
“Get-PnPCustomAction -Scope All |? Location -eq ScriptLink | Remove-PnPCustomAction”
Connect-PnPOnline –Url https://yoursite.sharepoint.com –Credentials (Get-Credential)
<#Add user custom action in your SharePoint site.
Here it adds my custom action under personal action menu#>
<#Get all custom action present under a site#> Get-PnPCustomAction <#Removes all custom actions that are ScriptLinks#> Get-PnPCustomAction -Scope All |? Location -eq ScriptLink | Remove-PnPCustomAction
This solution is brought to you by our SharePoint professionals.
Softree Technology employs SharePoint consultants; we are a technology services provider with the aim to help companies achieve exceptional performance through SharePoint. Our dedicated team of SharePoint consultants has the right bent of mind to understand and execute customer requirements.
Be it SPFx or SharePoint add-in developments, SharePoint 2019 developments, web part developments, migrating from SharePoint 2010/2013 to SharePoint 2013/2016/Office 365, Office 365, SharePoint hosted apps development or something else in SharePoint, we strive to deliver the best