Ошибка ключевого слова в параметре Powershell 2.0
Я использую Windows 7 RTM. Powershell 2.0 установлен по умолчанию. Я использую отличный Windows Powershell ISE для редактирования своих скриптов. У меня есть следующий скрипт:
Param($p)
Param($d)
echo $p $d
Я сохраняю скрипт как SayItAgain.ps1. Когда я пытаюсь запустить этот скрипт из интерактивной оболочки, вот так:
./SayItAgain -p "Hello"
Я получаю следующую ошибку:
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
Это известная проблема или я просто неправильно ее использую?