Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set-PnPListItem: Add -Force (and other fixes) #2396

Merged
merged 7 commits into from
Sep 29, 2022

Conversation

fowl2
Copy link
Contributor

@fowl2 fowl2 commented Sep 29, 2022

Adds a -Force parameter to Set-PnPListItem to allow forcing of updates even when not updating the item (#2018). Also reducing and whitespace fixes.

Also includes separate commits for these other issues I noticed:

  • Fix -SystemUpdate:$false
  • Throw when item can't be found and warn when content type can't be found

Can split out if required but risk merge conflicts with above.

Hope this helps :)

@KoenZomers
Copy link
Collaborator

Thanks @fowl2 !

@KoenZomers KoenZomers merged commit ef78302 into pnp:dev Sep 29, 2022
@fowl2 fowl2 deleted the setListItemForce branch September 29, 2022 23:59
@fowl2
Copy link
Contributor Author

fowl2 commented Sep 30, 2022

@KoenZomers nooo -SystemUpdate is my friend! 😥😥😥😥

@KoenZomers
Copy link
Collaborator

@KoenZomers nooo -SystemUpdate is my friend! 😥😥😥😥

No worries, -UpdateType SystemUpdate remains at your disposal to do exactly that

@fowl2
Copy link
Contributor Author

fowl2 commented Oct 28, 2022

I guess it's a personal thing, but I use -SystemUpdate all the time so the extra typing is something I'm not particularly enjoying.

@SjoerdV
Copy link

SjoerdV commented Jul 7, 2023

I guess it's a personal thing, but I use -SystemUpdate all the time so the extra typing is something I'm not particularly enjoying.

I agree, and Set-PnPFolderPermission still uses -SystemUpdate, so there might be some inconsistency added by this change. I vote to return to just using -SystemUpdate

BTW I am using 2.1.1 and -SystemUpdate still is a parameter for Set-PnPListItem, seems like the change was undone, without specifying this in the release notes for any release after 1.12.0 perhaps? Weird ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants