Invoke-TestPowerShellScript.ps1
<#
.SYNOPSIS This script prints Hello World along with the Name provided. .DESCRIPTION This script reads the Name and displays it along with the phrase Hello World. .PARAMETER Name The Name is required. .OUTPUTS The statement is displayed #> # Uncomment for debugging # Set-PSDebug -Trace 2 function Invoke-TestPowerShellScript() { # Name as a mandatory input param ( [Parameter(Mandatory, HelpMessage = "Please provide a Name.", Position=0)] [string] $Name ) Write-Host "Hello World" $Name } Invoke-TestPowerShellScript |