Chapter 2. Script Structure, Comment Blocks, and Script Logging
The Windows server scanning script requires three core components to make the script suitable for enterprise environments. These components include developing a strict scripting structure, creating the comment block, and developing a flexible logging solution. Strict scripting structures ensure that all your scripts are created in the same order. This means that each section of the code is defined in the same place in all your scripts. A uniform structure helps others understand your code quickly and enables them to follow a standardized format for changes.
You will also learn how to create a comment block at the beginning of the script. The comment block ensures that you fully document the purpose, the requirements, the bug fixes, and change history for the script. It also provides details on how to execute the script leveraging command line parameters.
The final core component discussed in this chapter is logging...