Script modules are useful if you need to share some common PowerShell functions or commandlets across multiple projects and steps in your workspace. In order to make a specific function available to any project got "Script modules" page using the left menu and create a script module:
Then head over to “Script modules” tab of any projects that need to use this function, include it in project using the toggle in the “Import” column and hit “Save”:
Now you can call the function in any step of this project where custom code is available (e.g. Run Script step template). The "Sample Module" is downloaded once to every machine that requires it. Then it is imported every time a script is run via Jaws Deploy on that machine.