Updating Active Directory User/Group Profile Information In SharePoint 2007 Site

If you would like to update Active Directory User/Group profile information in a SharePoint 2007 site, you can use the commands given below to achieve this.

  1. [Reflection.Assembly]::Load("Microsoft.SharePoint, Version=, Culture=Neutral, PublicKeyToken=71e9bce111e9429c")  
  2. $site = New-Object -TypeName Microsoft.SharePoint.SPSite -ArgumentList http://sharePointsiteurl  
  3. $group = $site.RootWeb.SiteUsers["Domain\grouploginname"]  
  4. $group.Name = "Group Name"  
  5. $group.Email = "groupemail@test.com"  
  6. $group.Update()  
Important Note

SID should match in both Active Directory and SharePoint for the user/group, else the steps given above will not work.

To check the SID of a group from Active Directory

Command - wmic useraccount where name='grouploginname' get sid


To check the SID of a group In SharePoint

Look for the user profile database to get the SID of the group.