When you have changed a Security Group in the Active Directory you may know that there will be a need to run STSADM –o MigrateGroup to change all SharePoint related information to let them know the new “Account Name”. Same you need to do when a user changed the AD account but with MigrateUser.

Example:

Old AD Name: MyDomain\Finanze
Old Display Name: Financial Members

You changed it to:

New AD Name: MyDomain\Finance
New Display Name: Financial Group Members

Run: STSADM –o migrategroup –oldlogin MyDomain\Finanze –newlogin MyDomain\Finance

These steps are definitely needed to still use the same AD Security Group. There seems to be an additional task necessary because the Display Name is still the old one.

Next steps are possible with PowerShell and in general it looks as following:

PS> [Reflection.Assembly]::Load("Microsoft.SharePoint, Version=12.0.0.0, Culture=Neutral, PublicKeyToken=71e9bce111e9429c")

PS> $site = New-Object -TypeName Microsoft.SharePoint.SPSite -ArgumentList <url>

PS> $group = $site.RootWeb.SiteUsers["<domain\group>"]

PS> $group.Name = "<updated group name>"

PS> $group.Update()

To use this with our example data:

PS> [Reflection.Assembly]::Load("Microsoft.SharePoint, Version=12.0.0.0, Culture=Neutral, PublicKeyToken=71e9bce111e9429c")

PS> $site = New-Object -TypeName Microsoft.SharePoint.SPSite -ArgumentList http://MyServer/MySiteCollection

PS> $group = $site.RootWeb.SiteUsers["MyDomain\Finance"]

PS> $group.Name = "Financial Group Members"

PS> $group.Update()

If you get an access denied please check the account you are running PowerShell and whether this account is a Site Collection Administrator. On Windows 2008 R2 you may run PowerShell also with the right privileges.