Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Write-HelloWorld.ps1 is a sample file for Measure-ScriptCode to work on.
# Write-HelloWorld.ps1
# Sample file for calculating PowerShell script code metrics
# Jan 2014
# If this works, Victor Vogelpoel <victor@victorvogelpoel.nll> wrote this.
# If it doesn't, I don't know who wrote this.
Set-PSDebug -Strict
Set-StrictMode -Version Latest
function Write-HelloWorld
{
# Just write it to the host! # This line has no code, just comment
Write-Host "Hello World!" # A line of comment on a codeline
Write-Verbose "Hello World!"
<#
.Synopsis
Writes hello world to the host
.DESCRIPTION
Long description
.EXAMPLE
Example of how to use this cmdlet
.EXAMPLE
Another example of how to use this cmdlet
.INPUTS
Inputs to this cmdlet (if any)
.OUTPUTS
Output from this cmdlet (if any)
.NOTES
General notes
.COMPONENT
The component this cmdlet belongs to
.ROLE
The role this cmdlet belongs to
.FUNCTIONALITY
The functionality that best describes this cmdlet
#>
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.