Sometimes it is essential to hide a column in a SharePoint list/library. It can be done easily with PowerShell. The following code hide “fieldName” in Edit and New Forms; however, it is available in display and new form!
#Get the Web $web = Get-SPWeb "URL" #Get the List $List = $Web.Lists["listName"] #Get the Field $Field = $List.Fields["fieldName"] $Field.ShowInEditForm = $false $Field.ShowInNewForm = $false $Field.ShowInDisplayForm = $true $Field.ShowInViewForms = $true $Field.Update() $web.Update() $web.Dispose()
(Visited 155 times, 1 visits today)