Forum Discussion
mbr0wn
Jan 24, 2024Copper Contributor
Change entire column value to same value?
I have a table on my sharepoint website, we have ~45k records and I need to change every single value of those records, in a specific column, to the same thing. How would I go about doing that?
ganeshsanap
Jan 25, 2024MVP
mbr0wn Try using PnP PowerShell for bulk update of SharePoint list items.
Example:
#Parameters
$SiteURL = "https://crescent.sharepoint.com/sites/PMO"
$ListName = "Projects"
#Connect to SharePoint Online site
Connect-PnPOnline $SiteURL -Interactive
#Get all Items from the list
$ListItems = Get-PnPListItem -List $ListName -PageSize 2000
#Update all list Items
ForEach($Item in $ListItems)
{
#Update List Item Title as its ID value
Set-PnPListItem -List $ListName -Identity $Item.Id -Values @{"Title"= $Item.Id} | Out-Null
Write-host "Updated Item:"$Item.ID
}
Source: SharePoint Online: Bulk Update All Items in Large List using PowerShell
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
mbr0wn
Jan 25, 2024Copper Contributor
Is this the most simple way to do this? I have never heard of PnP powershell and do not really know what i'm looking at.