3

I am using SharePoint 2016 and want to hide created, created by, modified and modified by fields. This is in the document library view and not the new, edit or display forms (i.e. if you click on a Documents document library).

I need to do it via Powershell as part of a migration script but have had no luck. Can anyone assist?

Many thanks!

2 Answers 2

0

Remove Field from View using PowerShell in SharePoint for your reference:

http://www.sharepointdiary.com/2015/11/remove-field-from-view-in-sharepoint-using-powershell.html

1
  • You can add details from the link. Links may break in future, content in your answer will add value. Commented Aug 1, 2018 at 6:16
0

You can remove columns out of a view by powershell.

Copy this code and paste to a text file you rename to filename.ps1.

Add-PSSnapin Microsoft.SharePoint.PowerShell -erroraction SilentlyContinue $web = Get-SPWeb https://siteurl $list = $web.Lists["put list name here"]; $view = $list.Views | ? { $_.Title -eq 'All items' } $view.ViewFields.delete(created) $view.ViewFields.delete(modified) $view.Update() 

The script gets web -> list -> view. Then it removes ceated and modified from the view. You can add more columns as you want. With update it updates the list.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.