Get started with PsBuilder by using a simple script. You can change it to fit your needs, and you might need it to see how your script builds.
For example, you copy the code of ConShell under the BSD 2-clause license, it would have been built using this tool.