How can I use shared scripts in my PowerShell scripts?


Packer seems to execute every PS script in isolation. I would like to use the same PS function in multiple different PS scripts. What’s the best way to achieve that? Right now I’m copying and pasting the code to every PS script that needs it but that’s not a maintainable solution long-term.