简体   繁体   中英

Update Sharepoint All list items using powershell

I have a list with 10,000 which uses a Nintex form. I have added a calculated column(Connected to a list column) on the form which gets the value based on other sql request field on the form. All new items will be having the calculated column value. Is there a way I can update all the list items with the value from the form. I know you can update the list items using powershell, but you need to have value to update it with. If you open the existing form and save it without doing anything it takes effect, but I cannot open 10,000 items for it to take effect. Is there any easy way to do this?

You oucld use powershell to update the list items, you don't need to have value to update it with.

Below code for your reference:

$web=get-spweb http://yoursite
$list=$web.lists['ListName']
$items=$list.items
foreach($item in $items){
$item.update()
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM