PowerShell to update an item in SharePoint List #SharePoint #PowerShell

If you are working in support you might get tickets to update a particular item as users are not able to update some columns as it’s locked due to some workflow or checks in forms┬┤customization. The user in workflow is on leave or currently not available so as support you can do it from back via PowerShell.

It can be done via some simple PowerShell commands as below

$web = Get-SPWeb “Put site URL here”

$list = $web.Lists[“ListName”]

$item = $list.GetItemByID(46)

$item[“Status”] = “Approved”

$item.update()

So in above example first we create reference to the web we are going to work upon, then refer to list on which you are going to work upon.

Next step is to get a specific item by using ID and we are using GetItemByID function. As an example we have used item id 46, you need to replace this with your ID.

Next is to update a particular column value, here “Status” is a column name, which is being updated with new value “Approved”.

Last step “update” function is important else value will not be updated.