How to Rename SharePoint Column Programmatically (PowerShell / C#)?

Here is how we can rename SharePoint list or site field or column programmatically with PowerShell and C# object model code:

PowerShell script to Rename a SharePoint Field:

Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue

$Web= Get-SPWeb ""

#Get the "Risk Metrics" List
$list= $web.Lists.TryGetList("Risk Metrics")

#Get "Project Name" Field
$field = $list.fields | where {$_.Title -eq "Project Name"}

#Set Field Display Name and Update
$field.Title ="Program Name"

Rename a SharePoint Field Programmatically (C#):

using(SPSite site=new SPSite(""))
    //Get the "Risk Metrics" List
     SPList list = site.RootWeb.Lists["Risk Metrics"];

    //Get "Project Name" Field
    SPField field = list.Fields["Project Name"];

    //Set Field Display Name and Update
    field.Title = "Program Name";

    //You can also use: list.Fields["Project Name"].Title = "Project Name";

PowerShell to change field display name in SharePoint site collection:

Add-PSSnapin "Microsoft.SharePoint.Powershell" -EA SilentlyContinue

$SiteURL = ""
$OldColumnName ="Department"
$NewColumnName ="Entity"

#Get the Site
$site = Get-SPSite $SiteURL

 #Iterate through each web (Sub-Site)
 foreach ($web in $site.AllWebs)
  #Array to Hold Lists with specific column
  $ListsToProcess= @()
  #Get All Lists
  $Lists = $web.Lists
  #ITerate through each list
     foreach ($list in $lists)
         #Iterate through each column
         foreach ($column in $list.Fields)
             #Check for the specific column
             if ($column.Title -eq $OldColumnName)
                   Write-Host "Found the Column in list: " $list.Title " at "$web.Url
                   #Send it to an Array
  #Process each list and rename the columns
  foreach ($list in $ListsToProcess)
         #Get the Old column by its name
         $column = $list.fields | where {$_.Title -eq $OldColumnName}
         #rename sharepoint list column powershell
         $column.Title = $NewColumnName

Similarly, to rename a site column, use:

$Column = $web.Fields.getFieldByInternalName("Title")
$Column.Title = "Project Title"
$Column.PushChangesToLists = $True

Salaudeen Rajack

Salaudeen Rajack - Information Technology Expert with Two-decades of hands-on experience, specializing in SharePoint, PowerShell, Microsoft 365, and related products. He has held various positions including SharePoint Architect, Administrator, Developer and consultant, has helped many organizations to implement and optimize SharePoint solutions. Known for his deep technical expertise, He's passionate about sharing the knowledge and insights to help others, through the real-world articles!

One thought on “How to Rename SharePoint Column Programmatically (PowerShell / C#)?

  • Hi Salaudeen,

    How to rename the column/field using sharepoint webservices ?Can i do that ?


Leave a Reply

Your email address will not be published. Required fields are marked *