-
Book Overview & Buying
-
Table Of Contents
PowerShell Troubleshooting Guide
By :
As mentioned in Chapter 1, PowerShell Primer, the help system in PowerShell is very useful. When writing functions and scripts in PowerShell, it is important to provide the same kind of documentation so users are able to use the code correctly.
In order to get the minimal amount of help available, the only requirement is to create a function. Take a look at the following screenshot, for example, shows the help content generated automatically for a simple function:

There is even help for specific parameters, as shown in the following screenshot:

It should be clear that PowerShell is using the definition of the function to generate the help content. This is extremely helpful for several reasons, some of which are listed as follows:
Change the font size
Change margin width
Change background colour