Expand Minimize

Avoid usage of inline comments

Inline comments are only useful when reading a script. Getting into the habbit of putting comments in a Write-Verbose or a Write-Debug can give the end user help, as well as the script reader.

CheckId SPC219101
TypeName AvoidUsingInlineComments
Severity Information
Type PowerShell File

Bad Practice

# This program does the following
Good Practice
Write-Verbose "This program does the following"
Write-Debug "The program is currently doing"

Disclaimer: The views and opinions expressed in this documentation and in SPCAF do not necessarily reflect the opinions and recommendations of Microsoft or any member of Microsoft. SPCAF and RENCORE are registered trademarks of Rencore. All other trademarks, service marks, collective marks, copyrights, registered names, and marks used or cited by this documentation are the property of their respective owners.