I have a scenario where I want/need to
- Modularize my code, so that bits and pieces can be updated easily over time.
- Store those bits and pieces on a network and access them using UNC paths
- Execute the main script a number of ways: SCCM with arguments, shortcut's with arguments and Windows Run from the registry. The former two as an Administrator, the latter as a user.
- Have a hash table of global scope that is populated by a Function in a module, and used by a function in another module.
- Use PowerShell 2.0, as my customer base is almost exclusively in Windows 7, and very resistant to installing newer versions of PowerShell.
As I started learning PS I verified that I could indeed Load a module from a UNC path, but the code I tested did not include Functions in that module. Now as I progress I am running into problems, specifically that my function call "not recognized as the name of a cmdlet, function, script file, or operable program."
So, I am wondering if I am barking up the wrong tree and I either need a newer version, or dot referencing is the only option, or...? My hope is all of this is possible and I am just shagging the code a bit.
Crossed fingers someone can verify the above is all possible, or offer an alternative solution.
Thanks!
Gordon