Just a query regarding a module I have which contains a number of simple functions to achieve a simple task (About 8 steps). I have an inline script with the code and it works to achieve this task. I began to break it down into a ‘each function’ does exactly one job and one job only and calls the next function to achieve this overall task (Put it all in a module).
The reason I am doing this is to improve my knowledge and hopefully distribute it if others where I work find it helpful. It solves a repetitive problem where I work and what I have so far in Powershell saves me a lot of pain
If I am finding that I am using Global variables a fair bit in the module am I heading in the wrong direction or is this acceptable to have 6 global variables for about 9 functions - interested in what those out there who may write ‘professional’ grade modules to distribute around the work place think. If this is a bad idea, I’ll head back to the drawing board to look at how I can redesign
Just looking for some general advice on Global variable use in Modules - thanks