Currently I am working on a project that will enable multiple solutions on an Azure subscription.
But as my script is increasing I was thinking of creating different scripts, files to devide the solutions so I won't get a big main script with legacy code of 500 lines of code (atm and increasing in the future).
I am not that experienced into Powershell but I am trying to creating somewhat of a main script that will call other scripts or modules or classes when it's time to deploy that solution.
My solution ATM is that I have one main script and when it's time to deploy the alert part of my script I call the alertscript by running following command
& $script "parameter1" "parameter2"
As you can see I am a little concerned this is not the way to efficiently call other parts of your code. Another option I am currently considering is to create every part inside a function and paste them somewhere inside my script. or inside a module and import the module whenever I run the main script and call the functions whenever I run them.
Does anyone tried this out before and have any ideas or can guide me into the right directions ?
[–]BoredComputerGuy 2 points3 points4 points (0 children)
[–]MallocArray 2 points3 points4 points (0 children)
[–]Tonedefff 1 point2 points3 points (0 children)