My typical PowerShell Script header
This is the template I use at the to of a script. I find that it’s helpful to type this out sometimes an refer to it as I go along.
<#
.SYNOPSIS
Brief description of what the script does.
.DESCRIPTION
A more detailed description of the script's purpose, functionality, and key points.
Mention any important aspects like prerequisites or assumptions.
.PARAMETER <ParameterName>
Description of the parameter. Repeat this block for each parameter in the script.
- Type: <Type of the parameter (e.g., [string], [int])>
- Mandatory: <True/False>
- Default: <Default value if applicable>
.EXAMPLE
An example of how to run the script.
PS C:\> .\ScriptName.ps1 -Parameter1 "Value1" -Parameter2 "Value2"
.NOTES
Author: <Your Name>
Date: <Creation Date>
Version: 1.0
Script Purpose: <Brief statement on script's purpose or scope>
Dependencies: <Any dependencies required for the script to run, such as specific modules or permissions>
.LINK
Provide any relevant links, e.g., to documentation, resources, or related scripts.
#>
# Begin Script
I tend to use the following template and scale back as needed.
If you do something different would love to see in the comments.