0

I need to do some post step stuff when Sitecore has been installed/set up (And no post step when solution has been built). And it seems that the poststeps folder in App_Data seems to be the way to go.

How does it work? For instance, when setting up SXA I've noticed this file in the poststeps folder: Sitecore.XA.Foundation.Installer.ExperienceAcceleratorWDPInstallationPostStep, Sitecore.XA.Foundation.Installer I assume it calls for method in assembly Sitecore.XA.Foundation.Installer(similar to a process in pipelines). Is it possible to call a Powershell script instead? Please advice :-)

7

1 Answer 1

2

There is a neat way to run post steps with Sitecore Powershell Extensions.

You can invoke it (SPE script) after package installation like regular post steps (Sitecore.Install.Framework.IPostStep implementations).

Advantages I see over regular post steps:

  • no DLL needed (if you are working with SXA you already have SPE installed ), post step can be executed immediately after packages installation,

    If you deploy items only or just want to invoke post step via packages installation you will save one application restart,

  • minimalistic configuration - all you need to do is to provide scriptID in custom attributes of your package,

  • easy to write custom dialogs. For me it is much easier and faster to scaffold new dialog in SPE than in xml. So if you need to ask about something user and based on the decision make actions, that's the way to go.

Example configuration

enter image description here

You can find current namespace of ScriptPostStep here

(currently: Spe.Integrations.Install.ScriptPostStep)

Demo:

enter image description here

Your Answer

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

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