I am trying to update the "Title" column in a SharePoint list (List has multiple "Titles" with the same name) and want to update all items where the Title matches

I have used the following:

$web = Get-SPWeb "http://TESTURL"
$List = $web.Lists.TryGetList("TESTLibrary")
$ListItemCollection = @()
$ListItemCollection | where {$_["Title"] -eq "TESTING123"}
$newListitem["Title"] = "New Name"

But its not bring back anything I have searched the internet but cant seem to find anything.

I am assuming I need somehow to add all the items in list "TESTLibrary" called "TESTING123" into an array and then for each item update the Title with the new name.

Sorry but I am completely new to array never used them before.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.