1

I know how to use PowerShell to create a new SharePoint Site Settings link, but I cannot seem to find how to create a custom group within site settings.

Here is the code for creating the Custom Action:

$siteSettingLink = $Context.Web.UserCustomActions.Add();
$siteSettingLink.Group = "SiteTasks";
$siteSettingLink.Location = "Microsoft.SharePoint.SiteSettings";
$siteSettingLink.Name = "Sample_CustomSiteSetting";
$siteSettingLink.Sequence = 1000;
$siteSettingLink.Url = '/Pages/CustomPageContent.aspx';
$siteSettingLink.Title = "Custom Site Settings Link";
$siteSettingLink.Update();
$Context.ExecuteQuery();

Then the '.Group' property would reflect my custom group ID. I just cannot seem to figure out how to create the custom group using CSOM and PowerShell.

Here is the code to do it if you deploy the XML:

<CustomActionGroup Id="CannonFodderUtilities"
Location="Microsoft.SharePoint.Administration.Applications"
Title="Utitilies"
Sequence="80"
ImageUrl="/_layouts/15/images/CannonFodder/CannonFodderLogo.png"
xmlns="http://schemas.microsoft.com/sharepoint/" />

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.