1

I want to create a trigger for an Event Receiver (itemupdated) for all items in a list. I know that Ι can just "update" the item through PowerShell, but I can't do that because the list has versioning.

So, is there a way with PowerShell to trigger a specific Event Receiver for all items in a list?

0

Since an event receiver is attached to a specific event, it's only normal that the event needs to occur before the receiver can be executed.

That being said, to execute an ItemUpdating/ed event, obviously your list item should be updated.

On the other hand, if you own the code base yourself, you should

  • Separate your code, so that your executing code accepts a ListItem or Dictionary object which would be the same as which your EventReceiver has access to
  • Call this executing function from your eventreceiver, or call the same function from PowerShell, with the necessary parameters (listitem, dictionary, ...)

Long story short: no, you cannot trigger the event receiver itself without invoking it's event first.

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.