I'm working on rewriting a script I have to allow for more dynamic configuration. This will require quite a few parameters, and while I have no problem using parameters the reality is once you have the ones you like they're not going to change. You'll be running this script from a scheduled task so a lot of parameters in Task Scheduler can also be a little painful.
I'm curious what's the general thoughts on getting a bunch of information into a script? Maybe a few "text blocks" (for example, business and address) but mostly several parameters.
One thought would be to have a INI file. Another would be a hash table at the very beginning that you could edit to put in your requirements. Hate having someone go in and edit the code (even if it is a hashtable) though. Tough call.
How have you, or people you've seen, solved this kind of problem?
by mjolinor at 2013-05-01 13:22:36
Have a look at get-help about_data_sections.
by poshoholic at 2013-05-01 13:30:29
Personal experience: IT admins get csv files better than other files where they could change configuration. I've used different methods of managing/using that information internally, but for external use where you want someone to have file-based access for modifying some configuration that will rarely be changed, csv files is one good way to do so that is pretty easy to do change without breaking something.