In order to avoid repetitive code, it would be useful to make code snippets and/or use Instance Variables in PowerShell executables.
For instance, in this article
API keys are used in PowerShell Executables. If you have multiple scripts using the same key, you want to store them somewhere centrally.