locked
Refactoring Profile Scripts RRS feed

  • General discussion

  • Hello Experts,

    We are using a PowerShell profile which points to script on a network share. This Script which will load a module which will in turn dot source the scripts on the network share. As the number scripts is getting increased it is getting difficult to manage. Please advise on the best practices on combining the scripts into modules and calling them from the parent module or is there any better way to achieve this task. Thanks.

    • Changed type Bill_Stewart Wednesday, July 22, 2015 3:06 PM
    Monday, May 25, 2015 10:35 AM

All replies

  • Scripts should be isolated into separate modules.  Hey will load "on demand" with V3 and later.  No need to load any modules.  Just use the functions and the modules will be discovered and loaded.  Try to keep modules as small as necessary collecting related functions.

    Design of software systems takes experience.  As you build and test you should gain  some of that experience.  Ask specific questions as they arise.


    \_(ツ)_/

    Monday, May 25, 2015 2:43 PM
  • Thanks for your reply, i am working on this and will come back if face any issues.

    Regards,

    Raghu

    Tuesday, May 26, 2015 3:53 PM