How to add your module to the directory

Swoogan edited this page Sep 9, 2014 · 8 revisions


  1. Get a link to your module (PSM1 or ZIP file). See below for details.
  2. Fork
  3. Find the Directory.xml file. This is the atom feed with all modules.
  4. Add or update your module (take any other module as an example).
  5. Test your module using the local Directory.xml as the module source: install-module mynewmodule -DirectoryUrl "file://${pwd}/Directory.xml".
    This assumes your current directory is your git checkout directory; otherwise replace ${pwd} with the appropriate path.
  6. Decide if any code needs to be executed to complete the installation. Also check to see if you have an Install.ps1 file which should not be executed for PsGet-installations. If one of the two is valid for your module, please read How to execute arbitrary code after install? below.
  7. Commit and send me pull request.
  8. It will be available in main repo shortly.

Super Lazy

  1. Create a ticket in Issues section, put some information how to find your module.
  2. It will be available in the main repo eventually.


How to package module?

If you have single PSM1 file, you are done. Nothing else is needed or required. If your module is more then one script or have resources like images or even DLLs. Just ZIP the module folder. PsGet is smart enough to find module within your ZIP file.

Where to get link?

If you have single PSM1 file and you host it on GitHub, just give a raw link, something like . If you want to distribute your module as a ZIP and you host your code on GitHub, you can find the ZIP button on your repository home page and copy link, something like , this will be link to your ZIP file. Also you can find links to ZIP files for your tags.

How to execute arbitrary code after install?

If nothing else is configured in Directory.xml PsGet checks to see if there is a file named Install.ps1 along with your module file and executes it automatically for both installations and updates. If you don't want to execute Install.ps1 then you have to add the DoNotPostInstall to the xml (see below). If you want to execute Install.ps1 or another file for installations and not updates, you should add an invalid name as PostUpdateHook (best would be none). The file has to be a *.ps1-file. You can see a complex example below:

    <title type="text">HelloWorldWithoutPostInUp</title>
    <summary type="text">Zipped simple test module for PsGet.</summary>
      <name>Florian Freudenberg</name>
    <content type="application/zip" src="" />