Automatic Documentation with PowerShell

Maintain good documentation, especially up-to-date and readable,  it’s a very important requirement in every workplace.  So why don’t focus some of the automation or scripting on this subject?  Starting with a basic PowerShell script that generate a big part of it can be really precious, save time and bring value on a daily basis.

In this example Get-SimpleServerDoc we will store on a local folder all server and features installed on one or more windows server. Looking at the example is easy to run that script on all server in a specific OU / Domain or using a list from a file if desired.

Every time I write documentation my aim is to keep it simple, readable and updated.

This script is just a starting point with a lot of possibile improvements. We can save them on a shared folder for example or run the script on a scheduled task, so the documentation will be automatically generated.  If documentation can consist of a simple text file or even an html ad if that folder is the the website folder of IIS can be a simple webpage with this code:

Text files can be used for re-deploy the server with this oneliner:

But you can also save other important files or configuration file as well or the services with the startup type  automatic :



Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.