Exporting a configuration report to Word
Once we have identified all of the information about a system, it can be helpful to create a system information report. This report can take many forms, however often the most generally accepted form is using Microsoft Word. Once created, the configuration can be e-mailed, stored electronically, or printed and stored physically with the system.
In this recipe, we will create the framework for a Microsoft Word inventory report. In this situation, we will only be reporting on the network configuration, however it can be easily expanded to include the hardware, software, configuration, and security information.
Getting ready
For this recipe, we will be using a Windows Server 2012 system with Microsoft Word installed.
How to do it...
Perform the following to create a configuration report in Word:
Create our Word object.
Function New-WordDoc { $oWord = New-Object -Com Word.Application Set-Variable -Name oDoc -Value $oWord.Documents.Add() -Scope Global...