I have functions in a \'library\' file to be called from my \'worker\' script.
Library File
function ShowMessage($AValue)
{
$a = new-
In your worker file, dot-source the library file, this will load all content (functions, variables, etc) to the global scope, and then you'll be able to call functions from the library file.
=================== Worker file ==========================
# dot-source library script
# notice that you need to have a space
# between the dot and the path of the script
. c:\library.ps1
ShowMessage -AValue Hello
=================== End Worker file ======================