3

I want to set a ListItem value with PowerShell (SP2013).

As the following screenshot shows, I (the current user) have Full Control for this list. However, I cannot edit any field value. The value for "GITVersion" is just an example, the same applies to all other fields.

I checked, that the same user can edit when logged in over the web frontend. I tried other methods to set the value with no success, e.g. ValidateParseAndSet-function for the corresponding field like $versioninfoGit.Fields["GITVersion"].ValidateParseAndSet(.., "Anything")

What is wrong or how to find out?

PowerShell screenshot

EDIT 1

In order to be able to try various users when accessing the web and list, I tried Invoke-Command for farm, service and other accounts with the result that the part $web = Get-SPWeb http://SharePoint of the script block fails. According to the exception, the farm is not available.

Lacking other clues, I am guessing a weird permission problem as root cause. But then, I would suspect critical messages in the server logs, exceptions during execution, or at least issues when working with the frontend - none of it.

EDIT 2

Note that I am able to delete and create items. I also found out (meanwhile) that I can edit those list items I have created with PS, even when the list was re-read in from a new $web = Get-SPWeb http//sharepoint Those existing items where I cannot edit were created by a "real user" in the frontend.

  • Kindly check the answer here...sharepoint.stackexchange.com/questions/25466/… – Hardik Jul 5 '16 at 10:23
  • I did, but the initial New-SPAssignment, using and stopping it when done does not change my result. And apart from that, the method shown seems analogous to mine. Let me know if I am wrong! – StefG Jul 6 '16 at 4:53
  • You are refetching the list item on each row! Fetch it once and store it in a variable, set the field value on that stored object and call Update() on it – Robert Lindgren Jul 7 '16 at 6:46
1

May be users can only edit their own items. There is a setting somewhere ( see for example here: https://stackoverflow.com/questions/26510951/sharepoint-2013-list-users-only-view-their-own-items )

  • After searching somewhere, I found those settings. In my case, all users are allowed to see and edit everything. – StefG Jul 12 '16 at 7:05

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.