Comment-based help embeds PowerShell documentation in specially formatted comments associated with a script or function. Use it to describe purpose, parameters, usage, and realistic values for the next person who runs or maintains the automation. section 10.8.3 section 2.1.1
Build a useful help section by including:
- .SYNOPSIS for a short description and .DESCRIPTION for fuller behavior and intent. section 10.8.3
- .PARAMETER entries explaining every input, including when optional parameters become necessary. section 10.8.3 section 2.1.1
- .EXAMPLE entries that show concrete paths, object names, and values instead of unexplained variable placeholders. section 10.8.3
- A .NOTES area for general operational information, when additional context helps users. section 10.8.3
Function New-VmFromIso {
<#
.SYNOPSIS
Short description
.DESCRIPTION
Long description
.PARAMETER VMName
Parameter description
.PARAMETER VMHostName
Parameter description
.EXAMPLE
An example
.NOTES
General notes
#>
[CmdletBinding()]
param(
[Parameter(Mandatory = $true)]
[string]$VMName,
[Parameter(Mandatory = $true)]
[string]$VMHostName
)
}
Use this annotated function template as a starting structure, then replace its placeholder descriptions with precise behavior and parameter guidance. section 10.8.3

