Hello I am working on a powershell script to update the default values for a specific column (Year) from 2016 to 2017. We have several project sites (each projectsite is a sitecollection). I would like to update all the column values for all the sites in the different site collections
I have created the following, but isn't working:
Add-PSSnapin Microsoft.Sharepoint.Powershell
$site = Get-SPSite "http://xxx.westeurope.cloudapp.azure.com/sites"
$sitelists = foreach ($web in $site.AllWebs) {
foreach($list in $web.lists){ $list }}
$list = $Web.Lists["Documents"]
$field = $list.Fields["Year"]
$field.DefaultValue = "2017"
$field.Update()