Marc Duiker

My experiences & thoughts about Azure, Sitecore & DevOps.


Hands-on with Sitecore Helix: Anatomy of the Add-HelixModule.ps1 PowerShell script

-

Add-Feature PowerShell function

In my previous post I showed how I got to a solution which allows the developers in my team to create new Feature and Foundation modules with ease.

I showed the moving parts of the solution but I did not go into much detail of the most important part so that’s what I’ll do in this post. This would be particularly useful if you want to change the script yourself to match it to your needs.

A detailed look at add-helixmodule.ps1

The add-helixmodule.ps1 script is where all the action happens. The file is included in my Habitat fork and is also available
as a gist which is shown inline below.

I’ve added loads of comments to it today so I think should give you enough to work with. The function which handles the addition of projects to the solution through the DTE interface is called Add-Projects (how surprising!) and starts at line 283.

Please do let me know if you have comments or suggestions for improvements!

  • powershell
  • sitecore
  • helix
  • habitat
  • dte
  • envdte
  • visual
  • studio

Marc Duiker profile

Marc Duiker

Lead Consultant @ Xpirit
Co-founder of SUGNL

Twitter || LinkedIn || Github