I have a csv file with ID, Region and Phone number. I need to run a powershell to update all the items that has ID match to update Region and Phone Number. I have following and not sure if this is going to do it. I am starting with write-host and it shows blank. Any idea
$SiteUrl = "http://inside.power.gov"
$web = Get-SPWeb $SiteUrl
$ListName = "Survey List"
$List = $web.Lists[$ListName]
$csv = import-csv "c:\updateddata.csv"
foreach($item in $csv)
{
$spItems = $List.GetItemById($item.ID)
write-host $item.Region
write-host $item.Phone Number
write-host $spItems.Region Name
#$spItems["Region Name"] = $item.Region
#$spItems["Phone Number"] = $item.Phone Number
#$spItems.SystemUpdate()
}
$web.Dispose()