Creating a change report
With computers, the only thing that is consistent is change. A change can be as simple as installing a hotfix or as major as upgrading the operating system. Regardless of the cause or severity, tracking the changes made to your environment is often the key to resolving problems and retaining a secure and stable environment.
In this example, we will be reporting on changes to the network configuration of our system. This sample process can be expanded to include the installed hardware and software, system configuration, and security settings as well.
Getting ready
For this recipe, we will be using a Windows Server 2012 system.
How to do it...
Perform the following to create a change report:
Create a custom
PSObject
to store our configuration.$myComp=@{}
Collect the network information, and add it to the
PSObject
.$ipAddresses = Get-NetIPAddress | ` Select-Object InterfaceIndex, InterfaceAlias, IPAddress, PrefixLength $myComp.IPaddr = $ipAddresses
Save the
PSObject
to a file...