Scenario
During my training, I was asked to modify, the title of “Name” field (out of box site column) from a page library. As it was out of box and widely used field, so we cannot change it web level. I had to do it, using PowerShell. Following are few self-described PowerShell command to fulfil my requirement. Following figure showing the field title before modification.
Script:
- Getting the site
$site = Get-SPSite -Identity http://Kirti:1111/
- Getting the web, where the Page library exists
$web = $site.RootWeb
- Getting required Page Library
$list=$web.Lists["Pages"]
- Find the “NAme” (OOB Field) field need to changed
$field = $list.Fields["Name"]
- Change the Title of the Field
$field.title="File Name"
- Commite the changes to SharePoint
$field.update()
The property of the site column will changed as shown in following figure.