Add-PnPFile - Modified/ Editor field cannot be set to a specific person #671
Unanswered
Max-Enrico
asked this question in
Q&A
Replies: 2 comments 2 replies
-
I've had problems like this in the past. I have had to use Set-PnPListItem to fix it after I added the file or list item. Check out example #6 for Set-PnPListItem. You have to do a system -UpdateType. I've also had to set both the Author and Editor to get either of them to be set. |
Beta Was this translation helpful? Give feedback.
2 replies
-
For future ref, issue #673 was created. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Add-PnPFile -Path $File.FullName -NewFileName $File.Targetname -Folder $Documentlist -Values @{ Editor=$SPOFileOwnerID ; Author=$SPOFileOwnerID}
Author field will be filled correctly
Editor field is even the connect user.
Tested with PnP.PowerShell 1.5.0 powershell 5.1 as well as visual studio code host 2021.2.2.
With the last version of SharePointPnPPowerShellOnline it works.
Is this a known behavior?
thank you,
Enrico
Beta Was this translation helpful? Give feedback.
All reactions