Basically I have a list having thousands of record.
I want to add a new column with default value into this list..so how it could be done so that every existing records will have this default column value.
What solutions are possible? Please Help.
Should look something like this in PowerShell. Please test and tell me if all is ok :).
$spWeb = Get-SPWeb http://website
$spList = $spWeb.Lists[“ListName”]
$spListItems = $spList.Items
$defaultvalue = “vlad rocks”
ForEach ($spItems in $spListItems) {
$spItems[“YourColumnName”] = $defaultvalue
$spItems.Update()
}