I'm trying to write a script that will unarchive a list item from a sql database archive. The data is going back to the same list that it was in originally so the fields are all matched up. I'd like to be able to put the item back in with the same ID, so lookups in other lists aren't broken. I'd done some research and it seems that others have had success by setting the ID field to readonlyfield = false but I haven't been able to manage it.
$lstStudents = $web.Lists["Students"]
$lstStudents.Fields["ID"].ReadonlyField = $false
$lstStudents.update()
Completes without any errors, but the ID of the item when I run the rest of the script doesn't keep the desired ID. Furthermore, when I check the value of $lstStudents.Fields["ID"].ReadonlyField it still says true.
Any ideas appreciated.