4

I have created the custom list with the default view using power shell script.Also added the required columns.but I don't want to show the "Title" column in All items view.How to handle this using power shell script ?

1 Answer 1

5

Something like the following:

$web = Get-SPWeb -Identity 'http://www.spsite.com/subsite'
$List = $web.Lists['MyList']
$column = $List.Fields.GetFieldByInternalName('Title')
$column.Hidden = $true
$column.ShowInDisplayForm = $false
$column.ShowInViewForms = $false
$column.ShowInEditForm = $false
$column.ShowInListSettings = $false
$column.Update()

# To delete the column, simply add the following row
$List.Fields.Delete($column)
2
  • This code helps to just hide the title field in add new item page.I need to remove the "Title" in list default view.please suggest an idea.
    – PGP
    Commented Nov 3, 2016 at 10:04
  • @GokulPgp See my updated answer
    – Benny Skogberg
    Commented Nov 3, 2016 at 10:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.