I have created a list and added some new fields in my sharepoint site. I now want to add my new fields onto the All Items view using Powershell is this possible? I tried :
$viewFields = New-Object System.Collections.Specialized.StringCollection
$viewFields.Add("Title")
$viewFields.Add($myFieldPrivacyStatementurl)
$viewFields.Add($myFieldIsActive)
$viewFields.Add($myFieldSortOrder)
#
# View Name
$viewName = “All Privacy Statements”
#
# Finally – Provisioning the View
$myListView = $myList.Views.Add($viewName, $viewFields, "", 100, $True, $False)
#
$myListView.DefaultView = $True
$myListView.Update()
#
$myList.OnQuickLaunch = $True
$myList.Update()
But this just adds a new all items view any help would be appreciated