Office-docs-powershell: Custom Editor and Modified date when creating an item

Created on 24 Jan 2019  路  9Comments  路  Source: MicrosoftDocs/office-docs-powershell

Hi,

I am copying a collection of items from a list to another. Eveything is correctly copied, except the Editor / Modified date values. Even though I provide them, the script does actually use the current time and the current user who is adding the item through the script.

Do you know of any workaround for this? thanks.

Aberto

All 9 comments

Hi @holylander , thank you for your feedback.

Could you let me know what article are you talking about? Thanks!

Hi @dariomws306 ,
Thanks for your reply. So, I think I can not reference any particular article related with the issue, but I can describe an scenario.
When using the pnp-powershell function Add-PnPListItem with some custom fields, I am not able to set a certain custom user in the "editor" column, neither a custom date as "modifed date" column. It will always defaults it to the user running the script, and the present date. Hope this explains the issue better, thanks.

Solution into this goes into PR #3098
You can't modify the author or date; they are the author the value of the current user running the script and the time is the current date when the cmdlet is called.

@officedocsbot unassign @yogkumgit

@yogkumgit PR #1998

@officedocsbot assign @yogkumgit

Hello @holylander and @yogkumgit as this issue has a PR already merged and closed, this issue can be closed. Thanks

@get-itips Thanks Andres.

@officedocsbot close

Was this page helpful?
0 / 5 - 0 ratings