In this post we will discuss how we can make non editable field in list using PowerShell in SharePoint 2010.
Also you can check out:
Follow below steps:
1. First we create list and add the column Name as a text with calculate value. See in fig
2. Now i want to this Name Column non editable. So we use power-shell script for this.
3. Run following script
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue
#Getting the Web
$web = Get-SPWeb "http://test:7070/"
#Getting the List
$List = $Web.Lists["TesetReadOnly"]
#Getting the Field
$Field = $List.Fields["Name"]
#Setting the field to Read only
$Field.ReadOnlyField = $true
4. Now you see the Name column is non editable (not showing in your form new/edit/display) that's value take calculated or default. See in fig
5. After Saving the item Name field value take as a calculated. See in fig