Hi,
I am trying to update a column in all items in a document library via Powershell. The column is Name and it will updated with two combined existing fields Name and ID. The result is Name_ID. This is what I have so far. I think I am close but missing something
$spWeb = Get-SPWeb -Identity http://www.google.com/$spsite = Get-SPSite -Identity http://www.google.com/test
$spListItem [“FileName”] = $spListItem [“Name”]+$spListItem [“ID”]
$spList = $spWeb.Lists[“Test Library”]
foreach($item in $list.Items)
{
if($item["Name"] = "Item")
{
$item["Name"] = "[Name]_[ID]"
$item.update()
}
}
$spListItem.Update()