I need to write a PowerShell script to update a choice column with a specific value in all the items of a List. Following is the main part of the script
$siteUrl = "http://mySharePointSiteUrl/"
$SPWeb = Get-SPWeb $siteUrl
$SPList = $SPWeb.Lists["ListName"]
$listItems = $SPList.Items;
foreach($item in $listItems){
$item["ChoiceColumnName"] = "Choice1"
$item.update();
}
This approach works for list with small number items, but will it be efficient for list having more than 5000 items?
Is there any other way for the same ?