Chapter 5. System documentation
This chapter covers
Using WMI to discover information about your systems is the traditional role of the technology. Many of the WMI-based scripts that you’ll find will show how to perform these tasks. Documenting systems is a necessary task, but one that most administrators put off until they’re forced into it. It’s a long, tedious, and boring process.
Not anymore! The scripts you’ll work with in this chapter won’t necessarily make documenting your systems interesting, but they will make it a quick and relatively painless process. Run the functions from this chapter and output the results to a file. Instant documentation! I recently had to update the documentation for several hundred servers ahead of an audit, and the scripts I used were based on this chapter. It ran as an overnight task. A quick check the next morning, and that activity was marked as complete. Compare that to how long the documentation would take to prepare manually, and the savings in time and effort available through PowerShell and WMI soon become apparent.
Tip
Notes on the structure of the scripts and on how to use the functions are given in the “about this book” section at the start of this book. Remember also that the functions can be quickly rewritten if you only need a subset of the data, such as if you only need the operating system version and service pack.