I have several newly added save events for existing items. Any way to force a save of an item? When I do $item.Editing.BeginEdit() / $item.Editing.EndEdit() in PowerShell it returns false since nothing changed.

Trying to think of a field I can update to trick into thinking it changed.

  • Whats the reason that you want to trigger save events even if the item fields didnt change? Aug 30, 2018 at 20:46
  • The item save events are updating fields from other items. Like item A needs a calculation from items B and C. So I need Item A to run a save to trigger the event to do the calculations. Its easier than trying to rebuild the calculation code in PowerShell.
    – Chris Auer
    Aug 30, 2018 at 21:08

3 Answers 3


This is going to be a very short answer.

But $item.Editing.EndEdit($true, $false) should do the trick.

The two parameters are

  • updateStatistics
  • silent

Setting updateStatistics to true SHOULD force Sitecore to write a new Modified Date, Modified By etc. and thus force a save of your item.

Setting silent to true would defeat your purpose, as it would supress events.

Edited to add

But also be aware of this. I'm not sure if there's an issue involving Sitecore Powershell Extensions or what's going on.

Item.Editing.EndEdit() is not triggering save event when called from Powershell extension


I don't know if the following code can be run from Powershell extensions, But i remember the following Sitecore API used to raise the Item:Saved events :

Sitecore.Events.Event.RaiseItemSaved(this, new Sitecore.Data.Events.ItemSavedEventArgs(item));
  • This one worked for me: $itemChanges = New-Object -TypeName "Sitecore.Data.Items.ItemChanges" -ArgumentList $_ $args = New-Object -TypeName "Sitecore.Data.Events.ItemSavingEventArgs" -ArgumentList $_, $itemChanges [Sitecore.Events.Event]::RaiseItemSaving($this, $args) Oct 21, 2020 at 1:01

What you can do is change __Updated by field to a value which you know that the item doesn't have, e.g. sitecore\pse script. Sitecore will think there is a change so it will execute all the events and update statistics, and it will set the __Updated by field to the current user value, ignoring the value which you use in the script, e.g.:

$item["__Updated by"] = "sitecore\pse script"

will result in

Sitecore powershell force saving item

If you run that script as Admin.

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.