kwizcom banner advertisement

How to Rename a SharePoint Group using PowerShell?

Requirement: On a marketing site, site owner wanted to rename "Marketing Members" group name to "Marketing Managers" as it makes more sense to him.

How to Rename a SharePoint Group?
To rename a SharePoint 2013 user group, Navigate to:
  • Site settings >> Site permissions >> Pick your target group
  • Click on "Group Settings" from Settings Menu
    how to rename sharepoint group
  • Supply a new name for your SharePoint permission group.
    sharepoint 2013 rename security group
  • Click on OK to save your changes.
Pretty straightforward, isn't it?

Rename SharePoint group using PowerShell:
Renaming SharePoint groups can be achieved with PowerShell too. Here is my PowerShell script to rename a group in SharePoint 2013:
#sharepoint powershell change group name
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue

#Variables
$SiteURL = "http://intranet.crescent.com/sites/marketing/"
$GroupName = "Marketing Members" 
$GroupNewName ="Marketing Managers"

#Get site and Group objects
$Site = Get-SPSite $SiteURL
$Group = $Site.RootWeb.SiteGroups[$GroupName]

if($Group -ne $null)
    {
        #sharepoint rename permission group
        $Group.name = $GroupNewName
        #Update the group
        $Group.Update()
        Write-host "Group Name has been updated!" 
    }
#dispose site object
$site.Dispose() 
This PowerShell changes SharePoint group name!
How to Rename a SharePoint Group using PowerShell? How to Rename a SharePoint Group using PowerShell? Reviewed by Salaudeen Rajack on 1:21 PM Rating: 5

No comments:

Please Login and comment to get your questions answered!

Powered by Blogger.