Answer files
As you develop your enterprise scripting templates, you will find that you may need to modify small portions of code for running in different environments. For example, if you are using the same script in multiple non-trusted Active Directory forests, you most likely would have to store information about those respective forests in your script. This creates complexity as you would have to manage multiple scripts for multiple forests. Not only is this inefficient, but changing a validated script introduces a great amount of risk for scripting errors.
A common way to reduce this risk is to leverage answer files. Answer files are separate files that contain information you will use in your script. This allows you to modify parameters for your script, without having to touch the code in the script itself.
Some of the most common items to include in an answer file are:
- Script logging location: This defines where you want all your log files to be stored. This typically is locally to...