{"id":983,"date":"2019-03-28T06:37:09","date_gmt":"2019-03-28T06:37:09","guid":{"rendered":"http:\/\/blog.softreeconsulting.com\/?p=983"},"modified":"2019-03-28T06:37:09","modified_gmt":"2019-03-28T06:37:09","slug":"add-and-remove-custom-action-using-pnp-powershell","status":"publish","type":"post","link":"https:\/\/softreetechnology.com\/blog\/powershell\/add-and-remove-custom-action-using-pnp-powershell\/","title":{"rendered":"Add and Remove Custom Action Using PnP PowerShell"},"content":{"rendered":"\n<p>In this blog article, I am going to add\nand remove custom action using PnP PowerShell.<\/p>\n\n\n\n<p><strong>Adding a custom action to the SharePoint site:<\/strong><\/p>\n\n\n\n<p>The&nbsp;<strong>Add-PnPCustomAction<\/strong> command&nbsp;is used to add a\nuser custom action to a web or site collection.<\/p>\n\n\n\n<p><strong><u>Example:<\/u><\/strong><\/p>\n\n\n\n<p>This example adds a new custom action to the Site Settings and sets the Title, Name and other fields with the specified values.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Add-PnPCustomAction -Name &#8216;Item Search&#8217; -Title &#8216;Item\nSearch&#8217; -Description &#8216;Adds custom action to SiteSettings&#8217; -Group\n&#8216;SiteAdministration&#8217; -Location &#8216;Microsoft.SharePoint.SiteSettings&#8217; -Sequence\n1000 -Url &#8216;https:\/\/www.google.com&#8217;<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/i0.wp.com\/blog.softreeconsulting.com\/wp-content\/uploads\/2019\/03\/PnP-PowerShell-1.jpg?fit=960%2C84\" alt=\"\" class=\"wp-image-984\"\/><\/figure>\n\n\n\n<p><strong><u>Output:<\/u><\/strong><\/p>\n\n\n\n<p><strong>Gett<\/strong><strong>ing the custom\naction information:<\/strong><\/p>\n\n\n\n<p>The&nbsp;<strong>Get-PnPCustomAction<\/strong> command&nbsp;is\nused to return user custom action(s) of the\nweb or current site collection.<\/p>\n\n\n\n<p><strong><u>Example-1:<\/u><\/strong><\/p>\n\n\n\n<p>This example returns all custom\nactions of the current site.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Get-PnPCustomAction<\/li><\/ul>\n\n\n\n<p><strong><u>Output:<\/u><\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/i1.wp.com\/blog.softreeconsulting.com\/wp-content\/uploads\/2019\/03\/Get-PnPCustomAction-3.jpg?fit=960%2C166\" alt=\"\" class=\"wp-image-986\"\/><\/figure>\n\n\n\n<p><strong>Ex<u>ample-2:<\/u><\/strong><\/p>\n\n\n\n<p>This example returns the\ncustom action with the id \u201c47eaee71-7aa2-458a-8ca8-cbd48f5e68c3\u201d.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Get-PnPCustomAction -Identity 47eaee71-7aa2-458a-8ca8-cbd48f5e68c3<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/i1.wp.com\/blog.softreeconsulting.com\/wp-content\/uploads\/2019\/03\/Get-PnPCustomAction-4.jpg?fit=960%2C166\" alt=\"\" class=\"wp-image-987\"\/><\/figure>\n\n\n\n<p><strong>Removing a custom action from the SharePoint site:<\/strong><\/p>\n\n\n\n<p>The&nbsp;<strong>Remove-PnPCustomAction <\/strong>command&nbsp;is\nused to remove user custom action(s) from the\ncurrent web or site collection.<\/p>\n\n\n\n<p><strong>Example:<\/strong><\/p>\n\n\n\n<p>This example removes\nthe custom action with the id \u201c47eaee71-7aa2-458a-8ca8-cbd48f5e68c3\u201d.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Remove-PnPCustomAction\n-Identity 47eaee71-7aa2-458a-8ca8-cbd48f5e68c3<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/i0.wp.com\/blog.softreeconsulting.com\/wp-content\/uploads\/2019\/03\/Remove-PnPCustomAction-5.jpg?fit=960%2C118\" alt=\"\" class=\"wp-image-988\"\/><\/figure>\n\n\n\n<p><strong><u>Output:<\/u><\/strong><\/p>\n\n\n\n<p><strong>This solution is brought to you by our SharePoint professionals.<\/strong><\/p>\n\n\n\n<p><a rel=\"noreferrer noopener\" aria-label=\"Softree Consulting (opens in a new tab)\" href=\"http:\/\/www.softreeconsulting.com\/\" target=\"_blank\">Softree Technology<\/a>\u00a0employs 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.<\/p>\n\n\n\n<p>Be it\u00a0SPFx or SharePoint\u00a0add-in developments,\u00a0SharePoint 2019 developments, web part developments, migrating from SharePoint 2010\/2013 to SharePoint 2013\/2016\/Office 365, Office 365,\u00a0<a href=\"https:\/\/www.softreetechnology.com\/offshore-sharepoint-developers\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"SharePoint hosted apps development (opens in a new tab)\">SharePoint hosted apps development<\/a>\u00a0or something else in SharePoint, we strive to deliver the best<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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&nbsp;Add-PnPCustomAction command&nbsp;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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[221],"tags":[232,233,234,235,236],"class_list":["post-983","post","type-post","status-publish","format-standard","hentry","category-powershell","tag-add-custom-action-using-pnp-powershell","tag-get-pnpcustomaction","tag-pnp-powershell-custom-action","tag-remove-custom-action-using-pnppowershell","tag-remove-pnpcustomaction"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Add and Remove Custom Action Using PnP PowerShell - Softree Technology<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/softreetechnology.com\/blog\/powershell\/add-and-remove-custom-action-using-pnp-powershell\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Add and Remove Custom Action Using PnP PowerShell - Softree Technology\" \/>\n<meta property=\"og:description\" content=\"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&nbsp;Add-PnPCustomAction command&nbsp;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 [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/softreetechnology.com\/blog\/powershell\/add-and-remove-custom-action-using-pnp-powershell\/\" \/>\n<meta property=\"og:site_name\" content=\"Softree Technology\" \/>\n<meta property=\"article:published_time\" content=\"2019-03-28T06:37:09+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Add and Remove Custom Action Using PnP PowerShell - Softree Technology","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/softreetechnology.com\/blog\/powershell\/add-and-remove-custom-action-using-pnp-powershell\/","og_locale":"en_US","og_type":"article","og_title":"Add and Remove Custom Action Using PnP PowerShell - Softree Technology","og_description":"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&nbsp;Add-PnPCustomAction command&nbsp;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 [&hellip;]","og_url":"https:\/\/softreetechnology.com\/blog\/powershell\/add-and-remove-custom-action-using-pnp-powershell\/","og_site_name":"Softree Technology","article_published_time":"2019-03-28T06:37:09+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"admin","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/softreetechnology.com\/blog\/powershell\/add-and-remove-custom-action-using-pnp-powershell\/#article","isPartOf":{"@id":"https:\/\/softreetechnology.com\/blog\/powershell\/add-and-remove-custom-action-using-pnp-powershell\/"},"author":{"name":"admin","@id":"https:\/\/softreetechnology.com\/blog\/#\/schema\/person\/98740297642f06debccdcee2de84086b"},"headline":"Add and Remove Custom Action Using PnP PowerShell","datePublished":"2019-03-28T06:37:09+00:00","mainEntityOfPage":{"@id":"https:\/\/softreetechnology.com\/blog\/powershell\/add-and-remove-custom-action-using-pnp-powershell\/"},"wordCount":317,"commentCount":0,"publisher":{"@id":"https:\/\/softreetechnology.com\/blog\/#organization"},"image":{"@id":"https:\/\/softreetechnology.com\/blog\/powershell\/add-and-remove-custom-action-using-pnp-powershell\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/blog.softreeconsulting.com\/wp-content\/uploads\/2019\/03\/PnP-PowerShell-1.jpg?fit=960%2C84","keywords":["add custom action using pnp powershell","get-pnpcustomaction","pnp powershell custom action","remove custom action using pnppowershell","remove-pnpcustomaction"],"articleSection":["PowerShell"],"inLanguage":"en","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/softreetechnology.com\/blog\/powershell\/add-and-remove-custom-action-using-pnp-powershell\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/softreetechnology.com\/blog\/powershell\/add-and-remove-custom-action-using-pnp-powershell\/","url":"https:\/\/softreetechnology.com\/blog\/powershell\/add-and-remove-custom-action-using-pnp-powershell\/","name":"Add and Remove Custom Action Using PnP PowerShell - Softree Technology","isPartOf":{"@id":"https:\/\/softreetechnology.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/softreetechnology.com\/blog\/powershell\/add-and-remove-custom-action-using-pnp-powershell\/#primaryimage"},"image":{"@id":"https:\/\/softreetechnology.com\/blog\/powershell\/add-and-remove-custom-action-using-pnp-powershell\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/blog.softreeconsulting.com\/wp-content\/uploads\/2019\/03\/PnP-PowerShell-1.jpg?fit=960%2C84","datePublished":"2019-03-28T06:37:09+00:00","breadcrumb":{"@id":"https:\/\/softreetechnology.com\/blog\/powershell\/add-and-remove-custom-action-using-pnp-powershell\/#breadcrumb"},"inLanguage":"en","potentialAction":[{"@type":"ReadAction","target":["https:\/\/softreetechnology.com\/blog\/powershell\/add-and-remove-custom-action-using-pnp-powershell\/"]}]},{"@type":"ImageObject","inLanguage":"en","@id":"https:\/\/softreetechnology.com\/blog\/powershell\/add-and-remove-custom-action-using-pnp-powershell\/#primaryimage","url":"https:\/\/i0.wp.com\/blog.softreeconsulting.com\/wp-content\/uploads\/2019\/03\/PnP-PowerShell-1.jpg?fit=960%2C84","contentUrl":"https:\/\/i0.wp.com\/blog.softreeconsulting.com\/wp-content\/uploads\/2019\/03\/PnP-PowerShell-1.jpg?fit=960%2C84"},{"@type":"BreadcrumbList","@id":"https:\/\/softreetechnology.com\/blog\/powershell\/add-and-remove-custom-action-using-pnp-powershell\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/softreetechnology.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Add and Remove Custom Action Using PnP PowerShell"}]},{"@type":"WebSite","@id":"https:\/\/softreetechnology.com\/blog\/#website","url":"https:\/\/softreetechnology.com\/blog\/","name":"Softree Technology","description":"Celebrating 10+ Years in SharePoint Consulting !","publisher":{"@id":"https:\/\/softreetechnology.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/softreetechnology.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en"},{"@type":"Organization","@id":"https:\/\/softreetechnology.com\/blog\/#organization","name":"Softree Technology","url":"https:\/\/softreetechnology.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en","@id":"https:\/\/softreetechnology.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/softreetechnology.com\/blog\/wp-content\/uploads\/2023\/03\/cropped-white-logo-soft.png","contentUrl":"https:\/\/softreetechnology.com\/blog\/wp-content\/uploads\/2023\/03\/cropped-white-logo-soft.png","width":844,"height":230,"caption":"Softree Technology"},"image":{"@id":"https:\/\/softreetechnology.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/softreetechnology.com\/blog\/#\/schema\/person\/98740297642f06debccdcee2de84086b","name":"admin","image":{"@type":"ImageObject","inLanguage":"en","@id":"https:\/\/softreetechnology.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/6fc78c8a7aa3fb0bf43c3b9a2e3962d7?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/6fc78c8a7aa3fb0bf43c3b9a2e3962d7?s=96&d=mm&r=g","caption":"admin"},"sameAs":["https:\/\/softreeconsulting.com"],"url":"https:\/\/softreetechnology.com\/blog\/author\/admin\/"}]}},"_links":{"self":[{"href":"https:\/\/softreetechnology.com\/blog\/wp-json\/wp\/v2\/posts\/983","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/softreetechnology.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/softreetechnology.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/softreetechnology.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/softreetechnology.com\/blog\/wp-json\/wp\/v2\/comments?post=983"}],"version-history":[{"count":0,"href":"https:\/\/softreetechnology.com\/blog\/wp-json\/wp\/v2\/posts\/983\/revisions"}],"wp:attachment":[{"href":"https:\/\/softreetechnology.com\/blog\/wp-json\/wp\/v2\/media?parent=983"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/softreetechnology.com\/blog\/wp-json\/wp\/v2\/categories?post=983"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/softreetechnology.com\/blog\/wp-json\/wp\/v2\/tags?post=983"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}