Powershell 2.0 Param Keyword Error
Estoy ejecutando Windows 7 RTM. Powershell 2.0 se instala de forma predeterminada. Estoy usando el excelente ISE de Windows PowerShell para editar mis scripts. Tengo el siguiente script:
Param($p)
Param($d)
echo $p $d
Guardo el script como SayItAgain.ps1. Cuando intento ejecutar esta secuencia de comandos desde el shell interactivo así:
./SayItAgain -p "Hello"
Recibo el siguiente error:
The term 'Param' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling o
f the name, or if a path was included, verify that the path is correct and try again.
At C:\users\cius\Code\powershell\SayItAgain.ps1:2 char:6
+ Param <<<< ($destination)
+ CategoryInfo : ObjectNotFound: (Param:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
¿Es este un problema conocido o simplemente lo estoy usando mal?