- Enterprise PowerShell Scripting Bootcamp
- Brenton J.W. Blawat
- 249字
- 2021-07-09 21:03:04
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 mechanisms. Logging mechanisms provide the ability to record information about what is being performed during the execution of the script. This information is typically written to log files, event logs, and data collection files.
In this chapter, you will:
- Learn the overall structure of a PowerShell Script
- Create a comment block to describe the script's function
- Develop a logging platform for your scripts
- 蕩胸生層云:C語言開發(fā)修行實錄
- Hands-On Data Science with SQL Server 2017
- Learning Apache Cassandra(Second Edition)
- 電腦上網(wǎng)直通車
- 分析力!專業(yè)Excel的制作與分析實用法則
- Hands-On Reactive Programming with Reactor
- 從零開始學PHP
- Apache源代碼全景分析(第1卷):體系結構與核心模塊
- INSTANT VMware vCloud Starter
- JRuby語言實戰(zhàn)技術
- Mastering OpenStack(Second Edition)
- 筆記本電腦維修之電路分析基礎
- Windows 7來了
- 開放自動化系統(tǒng)應用與實戰(zhàn):基于標準建模語言IEC 61499
- 玩轉機器人:基于Proteus的電路原理仿真(移動視頻版)