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 ?

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)
  • 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 Nov 3 '16 at 10:04
  • @GokulPgp See my updated answer – Benny Skogberg Nov 3 '16 at 10:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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