I want to delete some list items and recreate them using a csv file. I can see if I delete the items and then recreate, Sharepoint adds it's own auto icrement int. what if I want a set of fixed values say only 1... 100 for 100 rows. Should the PS script work
$csv = Import-Csv $csvPath
# delete all the current rows - later this may be changed to update current)
Delete-SPListItems $siteUrl $listTitle
#traverse each row
foreach ($row in $csv)
{
# now lets construct the new row we adding oops you must use the static names not the damnn names on the spreasheet.
$newItem = $list.Items.Add();
$newItem["ID"] = [System.Convert]::ToInt32($row.Id) ;