I'm trying to do implement some logic while a particular template item is getting published. To implement this logic I started exploring the Sitecore Powershell's Event Handlers. For the events like item:added, item:copied events I'm successfully able to get the output for the events, but for the Publish event like publish:begin, publish:end I'm not able to get any output from the result.

Below are the steps which I've followed to enable Sitecore Powershell events.

  1. Created the Patch file for Spe.Event.config
  <sitecore role:require="Standalone or ContentManagement" security:require="Sitecore">
      <event name="publish:begin">
        <handler type="Spe.Integrations.Tasks.ScriptedItemEventHandler, Spe" method="OnEvent" />
      <event name="publish:end">
        <handler type="Spe.Integrations.Tasks.ScriptedItemEventHandler, Spe" method="OnEvent" />
      <event name="item:added">
        <handler type="Spe.Integrations.Tasks.ScriptedItemEventHandler, Spe" method="OnEvent" />
      <event name="user:created">
        <handler type="Spe.Integrations.Tasks.ScriptedItemEventHandler, Spe" method="OnEvent" />
      <event name="publish:startPublishing">
        <handler type="Spe.Integrations.Tasks.ScriptedItemEventHandler, Spe" method="OnEvent" />
  1. Then I've created a module by following these steps, created Event Handlers with the help of this article
  2. When I tried for the first time it was not successful and found out the solution here but when I try the same for Publish events it's not working Sample Script

Can some please assist me to figure out what mistake is being done here. Thanks in advance.

  • 2
    From the screenshot the Events module is not yet enabled. There is a checkbox. Commented Dec 20, 2020 at 14:08
  • @MichaelWest Upon checking the item I couldn't find the checkbox for enabling it. Can you please name the Field name? Also when I created the script for item:added event I haven't done for enabling it. Commented Dec 20, 2020 at 14:44
  • @MichaelWest Thanks for the information. Events are triggered after enabling the checkbox of the Events Module. Commented Dec 21, 2020 at 2:22

1 Answer 1


As mentioned by Michael West, the enable checkbox is not checked. You need to activate it for the events to triggered.

Select the item Events and you will see a section named Module Activation. Check the enabled checkbox. Below is a screenshot.

enter image description here

  • Thanks Walid and Michael West. After enabling the checkbox my events are getting triggered. Commented Dec 21, 2020 at 2:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.