I have a very basic PowerShell script:
Param( [string]$MyWord ) function myfunc([string] $MyWord) { Write-Host \"$MyWord\" } myfunc @PSBoundParamete
If you want to use "Param" enclose it in the function like this:
function myfunc { Param( [string]$MyWord='hi' ) Write-Host "$MyWord" }